Class: GraphQL::PersistedQueries::StoreAdapters::MemcachedStoreAdapter
- Inherits:
-
BaseStoreAdapter
- Object
- BaseStoreAdapter
- GraphQL::PersistedQueries::StoreAdapters::MemcachedStoreAdapter
- Defined in:
- lib/graphql/persisted_queries/store_adapters/memcached_store_adapter.rb
Overview
Redis adapter for storing persisted queries
Constant Summary collapse
- DEFAULT_EXPIRATION =
24 * 60 * 60
- DEFAULT_NAMESPACE =
"graphql-persisted-query"
Instance Attribute Summary
Attributes inherited from BaseStoreAdapter
Instance Method Summary collapse
-
#initialize(dalli_client:, expiration: nil, namespace: nil) ⇒ MemcachedStoreAdapter
constructor
A new instance of MemcachedStoreAdapter.
Methods inherited from BaseStoreAdapter
Constructor Details
#initialize(dalli_client:, expiration: nil, namespace: nil) ⇒ MemcachedStoreAdapter
Returns a new instance of MemcachedStoreAdapter.
13 14 15 16 17 18 |
# File 'lib/graphql/persisted_queries/store_adapters/memcached_store_adapter.rb', line 13 def initialize(dalli_client:, expiration: nil, namespace: nil) @dalli_proc = build_dalli_proc(dalli_client) @expiration = expiration || DEFAULT_EXPIRATION @namespace = namespace || DEFAULT_NAMESPACE @name = :memcached end |