secret
Created

  • Download Gist
example.rb
Ruby
1 2 3 4 5 6
def my_cached_expensive_operation
Rails.cache.fetch("some_cache_key_#{Date.today}") do
# the actual expensive operation
my_expensive_operation
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.