Created
February 10, 2009 01:45
-
-
Save Gregg/61168 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Caching in the view | |
<% cache("#{@city.name}-photos") do %> | |
... | |
<% end %> | |
# Expiring the view | |
expire_fragment "#{city.name}-photos" | |
# Caching in the controller | |
write_fragment(key, content, options = nil) | |
read_fragment(key, options = nil) | |
fragment_exist?(key, options = nil) | |
expire_fragment(key, options = nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment