Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: cb65b7b60a
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.337 kB
module Cache
class << self
attr_writer :perform_caching
end
self.perform_caching = false
def self.perform_caching?
@perform_caching
end
def self.store
Rails.cache
end
def self.fetch(key, options = {})
if perform_caching?
store.fetch(key, options) { yield }
else
yield
end
end
end
Jump to Line
Something went wrong with that request. Please try again.