class DeprecatedRedisCacheStore
Ruby on Rails edge
Since edgeDeprecated Redis Cache Store
Deployment note: Take care to use a dedicated Redis cache rather than pointing this at a persistent Redis server (for example, one used as an Active Job queue). Redis won’t cope well with mixed usage patterns and it won’t expire cache entries by default.
Redis cache server setup guide: redis.io/topics/lru-cache
-
Supports vanilla Redis, hiredis, and
Redis::Distributed. -
Supports Memcached-like sharding across Redises with
Redis::Distributed. -
Fault tolerant. If the Redis server is unavailable, no exceptions are raised.
Cachefetches are all misses and writes are dropped. -
Local cache. Hot in-memory primary cache within block/middleware scope.
-
read_multiandwrite_multisupport for Redis mget/mset. UseRedis::Distributed4.0.1+ for distributed mget support. -
delete_matchedsupport for Redis KEYS globs. -
readsupportsdelete: trueto atomically read and delete a cache entry using the RedisGETDELcommand.cache.write("greeting", "hello") cache.read("greeting", delete: true) # => "hello" cache.read("greeting") # => nil
Inherits from
Constants
Attributes
Methods (defined here)
- # cleanup
- # clear
- # decrement
- # delete_matched
- # increment
- # read_multi
- # stats
- self. new
- self. supports_cache_versioning?
Private methods (17)
Show private methods Implementation detail — not part of the public API.
- # change_counter
- # delete_entry
- # delete_multi_entries
- # deserialize_entry
- # failsafe
- # instance_variables_to_inspect
- # pipeline_entries
- # read_entry
- # read_multi_entries
- # read_serialized_entry
- # serialize_entry
- # supports_expire_nx?
- # write_entry
- # write_multi_entries
- # write_serialized_entry
- self. build_redis_client
- self. build_redis_distributed_client
Methods (inherited)
From ActiveSupport::Cache::Store
(21)
- # cleanup
- # clear
- # decrement
- # delete
- # delete_matched
- # delete_multi
- # exist?
- # fetch
- # fetch_multi
- # increment
- # mute
- # namespace
- # namespace=
- # read
- # read_counter
- # read_multi
- # silence!
- # write
- # write_counter
- # write_multi
- self. new
From Object
(17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # with
- # with_options
From ActiveSupport::NumericWithFormat
(2)
- # to_formatted_s
- # to_fs