Class: ActiveSupport::Cache::CouchbaseStoreWithSaneTtl
- Inherits:
-
CouchbaseStore
- Object
- CouchbaseStore
- ActiveSupport::Cache::CouchbaseStoreWithSaneTtl
- Defined in:
- lib/active_support/cache/couchbase_store_with_sane_ttl.rb
Constant Summary
Constants included from SaneMemcachedTtl::Utils
SaneMemcachedTtl::Utils::MEMCACHED_MAX_TTL
Instance Method Summary collapse
- #decrement(name, amount = 1, options = nil) ⇒ Object
- #increment(name, amount = 1, options = nil) ⇒ Object
-
#initialize(options = nil) ⇒ CouchbaseStoreWithSaneTtl
constructor
A new instance of CouchbaseStoreWithSaneTtl.
Methods included from ActiveSupport::Cache::Concerns::SaneMemcachedTtlHelper
#extract_large_default_ttl!, #sanitize_ttl_options!
Methods included from SaneMemcachedTtl::Utils
#is_large_ttl?, #sanitize_ttl, #ttl_to_timestamp
Constructor Details
#initialize(options = nil) ⇒ CouchbaseStoreWithSaneTtl
Returns a new instance of CouchbaseStoreWithSaneTtl.
11 12 13 14 15 |
# File 'lib/active_support/cache/couchbase_store_with_sane_ttl.rb', line 11 def initialize( = nil) = || {} extract_large_default_ttl! , [:default_ttl, :expires_in] super end |
Instance Method Details
#decrement(name, amount = 1, options = nil) ⇒ Object
23 24 25 26 27 |
# File 'lib/active_support/cache/couchbase_store_with_sane_ttl.rb', line 23 def decrement(name, amount = 1, = nil) = || {} , [:ttl, :expires_in], :expires_in super name, amount, end |
#increment(name, amount = 1, options = nil) ⇒ Object
17 18 19 20 21 |
# File 'lib/active_support/cache/couchbase_store_with_sane_ttl.rb', line 17 def increment(name, amount = 1, = nil) = || {} , [:ttl, :expires_in], :expires_in super name, amount, end |