﻿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
22085	Allow CACHES['cache']['TIMEOUT']: None to set a non-expiring timeout by default.	honi	Rigel Di Scala	"BaseCache will try to cast the default timeout to int, which will throw a TypeError if timeout is None, thus setting default_timeout to 300. 

Relevant lines here: https://github.com/django/django/blob/master/django/core/cache/backends/base.py#L54-L59

Django 1.6 made some changes to allow setting the cache timeout to None for non expiring keys, as described here: https://github.com/django/django/blob/master/django/core/cache/backends/base.py#L54-L59

Explicitly passing None in cache.set works as expected. It does not work if set in CACHE dict in django settings. 

This currently does not work for me (keys expire in 300 seconds):
{{{
#!python
CACHES = {
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'unique-snowflake',
        'TIMEOUT': None
    }
}
}}}"	New feature	closed	Core (Cache system)	1.6	Normal	fixed	cache timeout		Accepted	1	1	0	0	0	0
