Class: ActiveSupport::Cache::MemcachedStore::DupLocalStore

Inherits:
Strategy::LocalCache::LocalStore
  • Object
show all
Defined in:
lib/active_support/cache/memcached_store.rb

Instance Method Summary collapse

Instance Method Details

#fetch_entry(key) ⇒ Object



255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/active_support/cache/memcached_store.rb', line 255

def fetch_entry(key)
  entry = super do
    new_entry = yield
    if entry.is_a?(Entry)
      new_entry.dup_value!
    end
    new_entry
  end
  entry = entry.dup

  if entry.is_a?(Entry)
    entry.dup_value!
  end

  entry
end

#write_entry(_key, entry) ⇒ Object



248
249
250
251
252
253
# File 'lib/active_support/cache/memcached_store.rb', line 248

def write_entry(_key, entry)
  if entry.is_a?(Entry)
    entry.dup_value!
  end
  super
end