Commit e32d6db7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

escaping cache id should be done in each cache plugin not here. It is already...

escaping cache id should be done in each cache plugin not here. It is already done for Distributed RAM cache and RAM cache can accept any cache id.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29666 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc0969cc
......@@ -153,9 +153,6 @@ class CachingMethod:
## cache factories will be initialized for every ERP5 site
factories = {}
## replace string table for some control characters not allowed in cache id
_cache_id_translate_table = string.maketrans("""[]()<>'", """,'__________')
def __init__(self, callable_object, id, cache_duration=180,
cache_factory=DEFAULT_CACHE_FACTORY):
"""Wrap a callable object in a caching method.
......@@ -217,7 +214,7 @@ class CachingMethod:
## generate cache id out of arguments passed.
## depending on arguments we may have different
## cache_id for same method_id
return str((method_id, args, kwd)).translate(self._cache_id_translate_table)
return str((method_id, args, kwd))
allow_class(CachingMethod)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment