sqlalchemy / sqlalchemy/dogpile.cache
Using front-end API is bugged on azure deployments
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 299
- Forks
- 50
- PR merge metrics
- No merged PRs in 30d
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CacheRegion.set/get/delete flow using the Redis backend and compare it with the working cache_on_arguments/invalidate path that uses function_key_generator. Reproduce the behavior on an Azure deployment and compare process logs and RedisInsight observations with macOS; done means the Azure-specific cause is identified and the front-end API works or its limitation is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python, redis
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100