Class: GraphQL::PersistedQueries::StoreAdapters::RedisStoreAdapter
- Inherits:
-
BaseStoreAdapter
- Object
- BaseStoreAdapter
- GraphQL::PersistedQueries::StoreAdapters::RedisStoreAdapter
- Defined in:
- lib/graphql/persisted_queries/store_adapters/redis_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(redis_client: {}, expiration: nil, namespace: nil) ⇒ RedisStoreAdapter
constructor
A new instance of RedisStoreAdapter.
Methods inherited from BaseStoreAdapter
Constructor Details
#initialize(redis_client: {}, expiration: nil, namespace: nil) ⇒ RedisStoreAdapter
Returns a new instance of RedisStoreAdapter.
13 14 15 16 17 18 |
# File 'lib/graphql/persisted_queries/store_adapters/redis_store_adapter.rb', line 13 def initialize(redis_client: {}, expiration: nil, namespace: nil) @redis_proc = build_redis_proc(redis_client) @expiration = expiration || DEFAULT_EXPIRATION @namespace = namespace || DEFAULT_NAMESPACE @name = :redis end |