1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.2.X] Add warning when using cache keys that might not work with

memcached.

This means testing with local dev caches (not memcache) will warn
developers if they are introducing inadvertent importabilities.  There
is also the ability to silence the warning if a dev is not planning to
use memcache and knows what they are doing with their keys.

Thanks to Carl Meyer for the patch. Fixed #6447.

Backport of r13766 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13767 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2010-09-12 19:07:09 +00:00
parent 6bc74f06e2
commit 686d6a414c
10 changed files with 167 additions and 10 deletions

View File

@@ -0,0 +1,9 @@
from django.core.cache.backends.locmem import CacheClass as LocMemCacheClass
class LiberalKeyValidationMixin(object):
def validate_key(self, key):
pass
class CacheClass(LiberalKeyValidationMixin, LocMemCacheClass):
pass