[Erp5-report] r29666 - /erp5/trunk/products/ERP5Type/Cache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 15 13:55:08 CEST 2009
Author: kazuhiko
Date: Thu Oct 15 13:55:08 2009
New Revision: 29666
URL: http://svn.erp5.org?rev=29666&view=rev
Log:
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.
Modified:
erp5/trunk/products/ERP5Type/Cache.py
Modified: erp5/trunk/products/ERP5Type/Cache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Cache.py?rev=29666&r1=29665&r2=29666&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Cache.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Cache.py [utf8] Thu Oct 15 13:55:08 2009
@@ -152,9 +152,6 @@
## 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):
@@ -217,7 +214,7 @@
## 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)
More information about the Erp5-report
mailing list