Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-mako
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-mako
Commits
3e6981c9
Commit
3e6981c9
authored
13 years ago
by
Mike Bayer
Browse files
Options
Downloads
Patches
Plain Diff
rename 'put' to 'set'
parent
4d4e1404
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES
+3
-0
3 additions, 0 deletions
CHANGES
mako/cache.py
+10
-3
10 additions, 3 deletions
mako/cache.py
with
13 additions
and
3 deletions
CHANGES
+
3
−
0
View file @
3e6981c9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
mako/cache.py
+
10
−
3
View file @
3e6981c9
...
...
@@ -81,7 +81,7 @@ class Cache(object):
creation_function
,
**
self
.
_get_cache_kw
(
kw
))
def
pu
t
(
self
,
key
,
value
,
**
kw
):
def
se
t
(
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
pu
t
(
self
,
key
,
value
,
**
kw
):
def
se
t
(
self
,
key
,
value
,
**
kw
):
"""
Place a value in the cache.
:param key: the value
'
s key.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment