﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22495	Locmem cache.add() fails with infinitely cached objects	Malcolm Box	Malcolm Box	"Simple test case:

{{{
from django.core.cache.backends.locmem import LocMemCache

c2 = LocMemCache(""locmem"", {})

In [18]: c2.set('test', 'locked', timeout=None)

In [19]: c2.add('test', 'new')
Out[19]: True

In [20]: c2.get('test')
Out[20]: 'new'
}}}

Since a timeout of None now means ""cache forever"", the cache.add() should not succeed and should return False.

Memcached behaviour for comparison:

{{{
In [24]: from django.core.cache.backends.memcached import PyLibMCCache

In [25]: memcache = PyLibMCCache(server=""localhost:11211"", params={})

In [26]: memcache.set('test', 'locked', timeout=None)

In [27]: memcache.add('test', 'new')
Out[27]: False
}}}"	Bug	closed	Core (Cache system)	1.7-beta-2	Normal	fixed			Accepted	1	0	0	0	0	0
