Module: Schematic::CacheProvider

Included in:
LocalCache, RedisCacheProvider
Defined in:
lib/schematic/cache.rb

Instance Method Summary collapse

Instance Method Details

#delete(key) ⇒ Object

Raises:

  • (NotImplementedError)


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.

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/schematic/cache.rb', line 20

def delete_missing(keys_to_keep, scope:)
  raise NotImplementedError
end

#get(key) ⇒ Object

Raises:

  • (NotImplementedError)


5
6
7
# File 'lib/schematic/cache.rb', line 5

def get(key)
  raise NotImplementedError
end

#set(key, value, ttl: nil) ⇒ Object

Raises:

  • (NotImplementedError)


9
10
11
# File 'lib/schematic/cache.rb', line 9

def set(key, value, ttl: nil)
  raise NotImplementedError
end