diff options
| author | Gregor MacGregor <Timothy.J.Clifford@gmail.com> | 2013-09-06 13:24:52 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-09-10 11:09:59 -0400 |
| commit | b2b763448f726ee952743596e9a34fcb154bdb12 (patch) | |
| tree | 5da48d220f856a2c8e42a0e1a19e909b7401ac59 /django/core/cache/backends/base.py | |
| parent | d59f1993f150f83524051d96b52df08da4dcf011 (diff) | |
Fixed #20841 -- Added messages to NotImplementedErrors
Thanks joseph at vertstudios.com for the suggestion.
Diffstat (limited to 'django/core/cache/backends/base.py')
| -rw-r--r-- | django/core/cache/backends/base.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py index deb98e7714..db76192354 100644 --- a/django/core/cache/backends/base.py +++ b/django/core/cache/backends/base.py @@ -96,27 +96,27 @@ class BaseCache(object): Returns True if the value was stored, False otherwise. """ - raise NotImplementedError + raise NotImplementedError('subclasses of BaseCache must provide an add() method') def get(self, key, default=None, version=None): """ Fetch a given key from the cache. If the key does not exist, return default, which itself defaults to None. """ - raise NotImplementedError + raise NotImplementedError('subclasses of BaseCache must provide a get() method') def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None): """ Set a value in the cache. If timeout is given, that timeout will be used for the key; otherwise the default cache timeout will be used. """ - raise NotImplementedError + raise NotImplementedError('subclasses of BaseCache must provide a set() method') def delete(self, key, version=None): """ Delete a key from the cache, failing silently. """ - raise NotImplementedError + raise NotImplementedError('subclasses of BaseCache must provide a delete() method') def get_many(self, keys, version=None): """ @@ -190,7 +190,7 @@ class BaseCache(object): def clear(self): """Remove *all* values from the cache at once.""" - raise NotImplementedError + raise NotImplementedError('subclasses of BaseCache must provide a clear() method') def validate_key(self, key): """ |
