class Store

Ruby on Rails 2.2.3

Since v2.2.3

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5 v4.0.13 v4.1.16 v4.2.9 v5.2.8.1 v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

An abstract cache store class. There are multiple cache store implementations, each having its own additional features. See the classes under the ActiveSupport::Cache module, e.g. ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most popular cache store for large production websites.

ActiveSupport::Cache::Store is meant for caching strings. Some cache store implementations, like MemoryStore, are able to cache arbitrary Ruby objects, but don’t count on every cache store to be able to do that.

cache = ActiveSupport::Cache::MemoryStore.new

cache.read("city")   # => nil
cache.write("city", "Duckburgh")
cache.read("city")   # => "Duckburgh"

Inherits from

Object

Methods (defined here)

Private methods

(1) Implementation detail — not part of the public API.

Used by

Subclasses (3)

Methods (inherited)

From Object (32)
From ActionController::Caching (3)
From ActionController::Cookies (2)
From ActionController::Flash (1)
From ActionController::HttpAuthentication::Basic::ControllerMethods (3)
From ActionController::RecordIdentifier (5)
From ActionController::RequestForgeryProtection (8)
From ActionController::Rescue (7)
From ActionController::Streaming (2)
From ActionController::Translation (4)
From ActiveRecord::Callbacks (14)
From ActiveRecord::Dirty (4)
From ActiveRecord::Locking::Pessimistic (1)
From ActiveRecord::NamedScope (1)
From ActiveRecord::Serialization (5)
From ActiveRecord::Transactions (4)
From ActiveRecord::Validations (7)
From Benchmark (1)
From ActionController::Components::InstanceMethods (2)
From ActiveRecord::Locking::Optimistic::ClassMethods (7)
From ActiveRecord::NamedScope::ClassMethods (2)
From ActiveRecord::Serialization::ClassMethods (1)
From ActiveRecord::Validations::ClassMethods (13)
From ActiveSupport::Memoizable (1)

Type at least 2 characters to search.

↑↓ navigate · open · esc close