Skip to content
Snippets Groups Projects
Commit 3e6981c9 authored by Mike Bayer's avatar Mike Bayer
Browse files

rename 'put' to 'set'

parent 4d4e1404
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,9 @@
core plugin is the mako.cache.CacheImpl
class.
- [feature] The 'put' method on Cache is now
'set'. 'put' is there for backwards compatibility.
- [feature] The <%def>, <%block> and <%page> tags now accept
any argument named "cache_*", and the key
minus the "cache_" prefix will be passed as keyword
......
......@@ -81,7 +81,7 @@ class Cache(object):
creation_function,
**self._get_cache_kw(kw))
def put(self, key, value, **kw):
def set(self, key, value, **kw):
"""Place a value in the cache.
:param key: the value's key.
......@@ -90,7 +90,14 @@ class Cache(object):
"""
self.impl.put(key, value, **self._get_cache_kw(kw))
self.impl.set(key, value, **self._get_cache_kw(kw))
put = set
"""A synonym for :meth:`.Cache.set`.
This is here for backwards compatibility.
"""
def get(self, key, **kw):
"""Retrieve a value from the cache.
......@@ -178,7 +185,7 @@ class CacheImpl(object):
"""
raise NotImplementedError()
def put(self, key, value, **kw):
def set(self, key, value, **kw):
"""Place a value in the cache.
:param key: the value's key.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment