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

Fixed #4041 -- Added a __contains__ method to cache backends. Thanks, Gary

Wilson and SmileyChris.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick
2007-05-08 04:13:46 +00:00
parent d1b0d34dc6
commit 0839a0046a
2 changed files with 8 additions and 0 deletions

View File

@@ -54,3 +54,6 @@ class BaseCache(object):
Returns True if the key is in the cache and has not expired.
"""
return self.get(key) is not None
__contains__ = has_key