search for: expire_act

Displaying 8 results from an estimated 8 matches for "expire_act".

Did you mean: expire_dict
2006 Apr 10
3
can I expire a cached page using a regex?
...under my view action. These could be /controller/view/1 or /controller/view/1/2 how can I expire all pages under /controller/view/? There must be a way, but I''m stumped. Here''s my broken attempt. Thanks in advance for any help,suggestions, or directions to a how to page. expire_action(:controller => ''/pragmatic'', :action => ''view'', :id => %r{\d*}, :page => %r{\d*}) -------------- next part -------------- An HTML attachment was scrubbed... URL: http...
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first, but then it happened that I''ve faced two gotchas, one from CoffeeScript and one from Rails itself. I have something like this: routes.rb post ''/fields/:id.:format'' => ''fields#show'', as: :field, constraints: {id: /\d+/} post ''/fields/remove/:id''
2006 Feb 21
2
caching and admin area
...dd something like this: caches_action :show, :whatever but i want the ''admin'' controller to do the sweeping. now if i add this to the ''admin'' controller it doesn''t work as the :controller field is referring to the ''admin'' controller: expire_action(:controller => ''example'', :action => ''show'') how do i refer to the ''public'' controller from within the ''admin'' controller so that i can expire different parts of the cache? thanks -felix
2006 Apr 08
2
trouble expiring cached pages
..."should" be working. class PragmaticSweeper < ActionController::Caching::Sweeper observe Comment def after_save(comment) expire_page(comment.post_id) end private def expire_page(post_id) logger.error("I made it to the caching method in the SWEEPER!!!!!!") expire_action(:controller => ''pragmatic'', :action => ''view'', :id => post_id) end end and now here''s my log that shows that the expiration "should" be happening. SQL (0.000369) INSERT INTO...
2006 Jan 21
1
clearing/expiring the ''index'' action.
Hi all, I''m having problems trying to expire the ''index'' action of a controller. In short, expire_action :action => ''index'' doesn''t work, but expire_fragment (url_for :action => ''index'').gsub(/\/index/,'''').split("://").last works fine and deletes the cached page as expected. I thought about this hack when I noti...
2009 Jul 09
0
Cache expiration with format not working as expected
...espond_to do |format| format.html format.csv {render :layout => false} end end Now the cached fragments when I go to the CSV urls are views/localhost:3001/orders/completed.csv views/localhost:3001/orders/incomplete.csv My sweepers have the following cache expiration commands .. expire_action :controller => :orders, :action => :completed, :format => :csv expire_action :controller => :orders, :action => :incomplete, :format => :csv ... But the log says Expired fragment : views/localhost:3001/completed.csv Expired fragment : views/localhost:3001/incomplete.csv noti...
2008 Jan 23
0
Action caching...
All, I am running Merb 0.5.0. Is there a way to specify an expiration time on an action cache, besides physically calling expire_action ? I have been looking at the code and I was not able to find support for that Something like cache_action( :fred => 30*60, :blee => 60*60 ) would expire fred in 30 min and blee in 1 hour... Any tips on how to achieve that ? Thanks, Fernand -------------- next part...
2012 Jan 25
0
Can't Get Caching to Work with Heroku and Memcache
...on) config.cache_store = :dalli_store config.action_controller.perform_caching = true (added after reading http://bit.ly/oRKub1) controller layout ''admin'' caches_action :show, :layout => false def show render :layout => ''application'' end def update expire_action :action => :show end I tried to test the expiration by changing a product, but the show view does not expire. So when I look at edit view for products, which I''m not caching, I can see the change saved (just added a word to the title), but when I view show, it still has the old i...