Skip to content

Commit

Permalink
Merge pull request #149 from marcinkuzminski/patch-1
Browse files Browse the repository at this point in the history
cache: store decorated function name in wrapper.
  • Loading branch information
amol- committed Mar 31, 2018
2 parents d360114 + cfcebc1 commit e15ca46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions beaker/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ def cached(*args, **kwargs):

def go():
return func(*args, **kwargs)
# save org function name
go.__name__ = '_cached_%s' % (func.__name__,)

return cache[0].get_value(cache_key, createfunc=go)
cached._arg_namespace = namespace
Expand Down

0 comments on commit e15ca46

Please sign in to comment.