Expire Cache for action caching with custom cache_path

270 Views Asked by At

I have implemented the action caching in rails 3.2 with following syntax

 caches_action :show, { 
 :unless => proc {|c| 
  current_user.present? || @current_member.present? || @is_crawler 
  },   :cache_path => proc { |controller| 
   controller.params.merge(:device => "#{device_type.to_s}")}}

But However I want the action cache to expire for all versions of the device type whenever the caching is updated. I am using the following syntax in controller. expire_action( :action => :show)

Sadly enough the above code does not work as intended. Quite frankly I am new to using caching and any help is much appreciated.

0

There are 0 best solutions below