﻿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
12982	Add get_or_set method to cache API	Alex Gaynor	Berker Peksag	"Add a {{{ cache.get_or_set() }}} method to Django's cache abstraction, this takes the same arguments as {{{ get() }}} except the 2nd argument is a callable, simple implementation looks like:

{{{
def get_or_set(self, key, func, **kwargs):
    val = self.get(key)
    if val is None:
        val = func()
        self.set(key, val)
    return val
}}}"	New feature	closed	Core (Cache system)	dev	Normal	fixed	cache	selwin@… snow0x2d0@… mumino	Ready for checkin	1	0	0	0	0	0
