This project is archived and is in readonly mode.

cache_sweeper yields blank output
Reported by Aaron | February 9th, 2010 @ 07:00 PM
In rails 3, adding a cache_sweeper to the controller makes the pages output blank
Comments and changes to this ticket
- 
            
         Aaron February 9th, 2010 @ 07:16 PM- Tag changed from cache_sweeper sweeper to cache, cache_sweeper, sweeper
 
- 
            
         Si April 4th, 2010 @ 06:56 PMI'm seeing this too. Instead of running any code in the method, I get the following plus a blank screen: Completed 200 OK in 717ms I'm running: ruby 1.9.2dev (2010-04-02 trunk 27189) [x86_64-darwin10] 
 Rails 3.0.0.beta2
- 
            
         Si April 4th, 2010 @ 10:50 PMLooks like ActionController::Caching::Sweeper doesn't return true as a default when callbacks aren't run (!controller.perform_caching). Including a patch. 
- 
            
         Si April 4th, 2010 @ 10:52 PM- Tag changed from cache, cache_sweeper, sweeper to cache, cache_sweeper, patch, sweeper
 
- 
            
         aaronchi April 5th, 2010 @ 03:12 AM- Tag changed from cache, cache_sweeper, patch, sweeper to cache, cache_sweeper, patch, rails3, sweeper
 
- 
            
         Si May 1st, 2010 @ 08:36 AMNow I'm pushing up to staging I see that the before filter will need to return true in all cases. This is because the sweeper filter aspect is really implementation detail, and sweepers shouldn't prevent actions running like regular filters can. I've updated the patch. 
- 
         Neeraj Singh May 1st, 2010 @ 03:15 PMI am not able to simulate this problem in rails edge. Could you try to simulate this problem with rails edge and see if it is still an issue. 
- 
            
         kevmoo May 6th, 2010 @ 11:27 PMReproduced on edge Ref: 6d7f2790cdb6cb232850, May 6, 2010 class MainController < ApplicationController 
 cache_sweeper :app_sweeperdef index end end class AppSweeper < ActionController::Caching::Sweeper 
 end
- 
            
         kevmoo May 6th, 2010 @ 11:31 PMVerified Si's patch 'return_true_for_non_caching_sweeper_filter.diff' fixes the issue. NO clue if this breaks anything else, but my page is loading. 
- 
            
         kevmoo May 6th, 2010 @ 11:48 PM...and I take that back. I added an after_save to the sweeper and we're back to the original issue -> blank output 
- 
         Neeraj Singh May 7th, 2010 @ 06:23 AMAttached is a patch with test. I was not really sure how to go about testing this one. So any feedback on testing strategy is welcome. 
- 
            
         Si May 7th, 2010 @ 08:24 AMHi Kevmoo, I updated that patch but the fix is the same in Neeraj's diff. Can you try that? 
- 
         Dan Pickett May 9th, 2010 @ 06:48 PM- Tag changed from cache, cache_sweeper, patch, rails3, sweeper to bugmash, cache, cache_sweeper, patch, rails3, sweeper
 
- 
            
         marian (at bitflut) June 8th, 2010 @ 09:23 PM- Tag changed from bugmash, cache, cache_sweeper, patch, rails3, sweeper to rails 3.0.0.beta4, bugmash, cache, cache_sweeper, patch, rails3, sweeper
 Still there in rails 3 beta 4 
- 
         
- 
         Repository June 8th, 2010 @ 10:21 PM- State changed from new to open
 (from [db23a95a616860e4fefa4ef83b396abe7ec0ea71]) cache_sweeper yields blank output [#3914 state:open] Signed-off-by: José Valim jose.valim@gmail.com 
 http://github.com/rails/rails/commit/db23a95a616860e4fefa4ef83b396a...
- 
         
- 
         Repository June 9th, 2010 @ 09:07 AM- State changed from open to resolved
 (from [f48aa14bf43fb103e5d128151061549ba6bb8c23]) Better test for ticket [#3914 state:resolved] Signed-off-by: José Valim jose.valim@gmail.com 
 http://github.com/rails/rails/commit/f48aa14bf43fb103e5d12815106154...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 
         4584 
          cache_sweeper returns a blank page without log
        This is a duplicate of 
3914 . 4584 
          cache_sweeper returns a blank page without log
        This is a duplicate of 
3914 .
- 
         4584 
          cache_sweeper returns a blank page without log
        A patch is already attached to #3914. Can
someone take a ... 4584 
          cache_sweeper returns a blank page without log
        A patch is already attached to #3914. Can
someone take a ...
- 
         4584 
          cache_sweeper returns a blank page without log
        Duplicate of #3914. 4584 
          cache_sweeper returns a blank page without log
        Duplicate of #3914.
- 
         3914 
          cache_sweeper yields blank output
        [#3914 state:open] 3914 
          cache_sweeper yields blank output
        [#3914 state:open]
- 
         3914 
          cache_sweeper yields blank output
        (from [f48aa14bf43fb103e5d128151061549ba6bb8c23])
Better ... 3914 
          cache_sweeper yields blank output
        (from [f48aa14bf43fb103e5d128151061549ba6bb8c23])
Better ...
 Aaron
      Aaron
 Bryan Liles
      Bryan Liles
 Damien MATHIEU
      Damien MATHIEU
 Dylan Markow
      Dylan Markow
 Jeremy Kemper
      Jeremy Kemper
 José Valim
      José Valim
 kevmoo
      kevmoo