Created
December 30, 2010 02:26
-
-
Save ahawkins/759381 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
# handles cached actions and fragments with easy | |
def write_fragment(key, content, options = nil) | |
if options[:tag] | |
tags = options[:tag].is_a?(Array) ? options[:tag] : [options[:tag]] | |
tags.each do |tag| | |
some_redis.sadd tag, fragment_cache_key(key) | |
end | |
end | |
super | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment