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:
3
django/core/cache/backends/base.py
vendored
3
django/core/cache/backends/base.py
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user