You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As suggested by @bargulg in #22 there should be room for caches like Redis to clean up their own stale values. Currently the expired logic takes place in APIConnection.get() which decides if a cache would be valid or not.
My thoughts:
Determining if the cache is expired is not up to APIConnection but the loaded caching plugin
The caching plugin should decide if it wants to use a relative or absolute time
The code in APIConnection.get() shouldn't be doing more then res = cache.get('key'), if res.valid: ... and cache.put('key')
The text was updated successfully, but these errors were encountered:
I like this idea, we just need more fleshed out workflows for implementing those cache mechanisms, and how each should work, unless you want to leave that up to the end-users of PyCrest.
As suggested by @bargulg in #22 there should be room for caches like Redis to clean up their own stale values. Currently the expired logic takes place in APIConnection.get() which decides if a cache would be valid or not.
My thoughts:
res = cache.get('key')
,if res.valid: ...
andcache.put('key')
The text was updated successfully, but these errors were encountered: