Sha256: f896c283fbad8dd76854b01d6d20528fabcca5f34d072e32783714b68c07e9ac
Contents?: true
Size: 592 Bytes
Versions: 4
Compression:
Stored size: 592 Bytes
Contents
class PageSweeper < Interpret::BaseSweeper def expire_cache(translation) # Because we inherit from a base_sweeper which is inside Interpret # namespace, we have to specify "/pages" as controller, otherwise Rails # will try to find the inexistent controller "interpret/pages" # # You can also use the 'translation' object passed as an argument to do a # smarter expiration logic. For instance, maybe you want to check translation.key # to find out which action inside which controller expire. expire_page :controller => "/pages", :action => "index" end end
Version data entries
4 entries across 4 versions & 1 rubygems