Class: LockBoxCache::Cache
- Inherits:
-
Object
- Object
- LockBoxCache::Cache
- Extended by:
- Forwardable
- Defined in:
- lib/lockbox_cache.rb
Defined Under Namespace
Classes: HashCache, RailsCache
Instance Method Summary collapse
-
#initialize(use_rails_cache = true) ⇒ Cache
constructor
A new instance of Cache.
Constructor Details
#initialize(use_rails_cache = true) ⇒ Cache
Returns a new instance of Cache.
40 41 42 43 44 45 46 |
# File 'lib/lockbox_cache.rb', line 40 def initialize(use_rails_cache=true) if use_rails_cache && defined?(Rails) @cache = RailsCache.new else @cache = HashCache.new end end |