According to RailsGuides: "Page caching ignores all options." I think I had a similar problem when cashing answers .xml
: I would write a cache for / /lol.xml
, but tried to expire the cache for operations /lol
( write
and expire
), which can be seen on the server log). How I did it: I made the "format-agnostic" cache as follows:
cashes_page :lol, :cache_path => Proc.new { |controller| controller.params.delete_if {|k,v| k == "format"} }
and expires in a sweeper, like this:
expire_page(:controller => "javascripts", :action => "lol")
He solved my problem. Also, as a note, should your lol
action be called lols
? Good luck.
source share