Module: Schematic::CacheProvider
- Included in:
- LocalCache, RedisCacheProvider
- Defined in:
- lib/schematic/cache.rb
Instance Method Summary collapse
- #delete(key) ⇒ Object
-
#delete_missing(keys_to_keep, scope:) ⇒ Object
Remove all keys matching ‘scope` that are NOT in `keys_to_keep`.
- #get(key) ⇒ Object
- #set(key, value, ttl: nil) ⇒ Object
Instance Method Details
#delete(key) ⇒ Object
13 14 15 |
# File 'lib/schematic/cache.rb', line 13 def delete(key) raise NotImplementedError end |
#delete_missing(keys_to_keep, scope:) ⇒ Object
Remove all keys matching ‘scope` that are NOT in `keys_to_keep`. `scope:` is required so shared caches (e.g. Redis) only prune their own namespace instead of wiping sibling caches that share a base key_prefix.
20 21 22 |
# File 'lib/schematic/cache.rb', line 20 def delete_missing(keys_to_keep, scope:) raise NotImplementedError end |
#get(key) ⇒ Object
5 6 7 |
# File 'lib/schematic/cache.rb', line 5 def get(key) raise NotImplementedError end |
#set(key, value, ttl: nil) ⇒ Object
9 10 11 |
# File 'lib/schematic/cache.rb', line 9 def set(key, value, ttl: nil) raise NotImplementedError end |