search for: when_fragment_expired

Displaying 1 result from an estimated 1 matches for "when_fragment_expired".

2006 Aug 25
1
Time based fragment caching plugin
...gment caching. It lets you do things like: <% cache ''fragment_name'', 10.minutes.from_now do %> <p>something intensive which will be cached for 10 minutes</p> <% end %> Also, there''s a convenience method so that in your controllers you can do: when_fragment_expired ''fragment_name'', 10.minutes_from_now do @stuff = do_something_intensive end This will check the fragment cache, see if it''s expired and if so it will execute the code in the block. It deals with expiring the fragment itself, so if using this you don''t need t...