Skip to content

Instantly share code, notes, and snippets.

@jjb
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjb/10000281 to your computer and use it in GitHub Desktop.
Save jjb/10000281 to your computer and use it in GitHub Desktop.
how to experiment with rails fragment cache key generation in the console
# inside rails console
include ActionController::Caching::Fragments
fragment_cache_key [User.first, "hello", :monkey, false]
# => "views/users/1-20140404193333893414000/hello/monkey/false"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment