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
According to the book, calling cache.model(key, f=None) should cause key to be deleted from the cache. However, in gluon.contrib.redis_cache.RedisClient.__call__, setting f=None only deletes the cached object if it has expired.
This causes a problem with @cache.action because it relies on the f=None deletion method to delete pages that were cached with an invalid HTTP status.
We should change the behavior of the Redis cache to match that of the other cache models (i.e., setting f=None should always delete the key from the cache).
Also, for extra safety, perhaps @cache.action should delete pages with an invalid status via cache_model.clear(r'^%s$' % cache_key) rather than cache_model(cache_key, None).
The text was updated successfully, but these errors were encountered:
For background, see https://groups.google.com/d/msg/web2py/1LoXXrPlIGE/bX2u3CJ2BQAJ.
According to the book, calling
cache.model(key, f=None)
should causekey
to be deleted from the cache. However, ingluon.contrib.redis_cache.RedisClient.__call__
, settingf=None
only deletes the cached object if it has expired.This causes a problem with
@cache.action
because it relies on thef=None
deletion method to delete pages that were cached with an invalid HTTP status.We should change the behavior of the Redis cache to match that of the other cache models (i.e., setting
f=None
should always delete the key from the cache).Also, for extra safety, perhaps
@cache.action
should delete pages with an invalid status viacache_model.clear(r'^%s$' % cache_key)
rather thancache_model(cache_key, None)
.The text was updated successfully, but these errors were encountered: