-
Notifications
You must be signed in to change notification settings - Fork 49
Description
We established a cache using the redis backend and used the front-end to explicitly define keys using...
CacheRegion.set(key: str, value: Any)
If a region does not have a key set (checked using CacheRegion.get(key, expiration_time=None, ignore_expiration=False)
a value is set before being returned, as in the following:
- Does this key have a value?
- Yes: return the value
- No: fetch a new value and store it in the cache key for next time
There was separate code that explicitly deleted specific keys using CacheRegion.delete(key: str)
. Think "separate UI that is manually able to purge the specific cache-key on-demand". Functionality worked and was verified using RedisInsight on macOS Monterey.
☝️ This implementation did not work for an unknown reason on deployment in azure
When the same logic was implemented using cache_on_arguments
with invalidate
, with a region that used a function_key_generator
, the implementation worked on azure deployments. Furthermore, log messages were seen in the process output (which wasn't seen before using the front-end API).
Not sure what the issue was. Feel free to ask for more info.