Class: ActiveSupport::Cache::MemCacheStore::DupLocalCache::DupLocalStore

Inherits:
Strategy::LocalCache::LocalStore show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/cache/mem_cache_store.rb

Instance Method Summary collapse

Methods inherited from Strategy::LocalCache::LocalStore

#clear, #delete_entry, #initialize, #read_entry, #read_multi_entries

Constructor Details

This class inherits a constructor from ActiveSupport::Cache::Strategy::LocalCache::LocalStore

Instance Method Details

#fetch_entry(key) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/cache/mem_cache_store.rb', line 45

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



38
39
40
41
42
43
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/cache/mem_cache_store.rb', line 38

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