Local Cache Store
Simple memory backed cache. This cache is not thread safe and is intended only for serving as a temporary memory cache for a single thread.
Methods
Class Public methods
new()
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 36
def initialize
  @data = {}
endInstance Public methods
clear(options = nil)
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 40
def clear(options = nil)
  @data.clear
enddelete_entry(key)
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 57
def delete_entry(key)
  !!@data.delete(key)
endread_entry(key)
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 44
def read_entry(key)
  @data[key]
endread_multi_entries(keys)
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 48
def read_multi_entries(keys)
  @data.slice(*keys)
endwrite_entry(key, entry)
          
          
          
          
          
            📝 Source code
# File activesupport/lib/active_support/cache/strategy/local_cache.rb, line 52
def write_entry(key, entry)
  @data[key] = entry
  true
end