Open peymanmortazavi opened 5 years ago
Because of the way this line is implemented (ignoring None and also 0 values) We can't use the following code:
None
0
cache.set('a', 'b', timeout=None) # normally this should never expire. cache.set('a', 'b', timeout=0) # this should immediately get deleted.
https://github.com/infoscout/django-cache-utils/blob/master/cache_utils/group_backend.py#L30
Django tries to keep this behavior consistent even when the provider doesn't support it by checking when the value is 0, never actually creating the entry.
Because of the way this line is implemented (ignoring
None
and also0
values) We can't use the following code:https://github.com/infoscout/django-cache-utils/blob/master/cache_utils/group_backend.py#L30
Django tries to keep this behavior consistent even when the provider doesn't support it by checking when the value is 0, never actually creating the entry.