[Erp5-report] r23768 - /erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Sep 23 17:14:09 CEST 2008
Author: kazuhiko
Date: Tue Sep 23 17:14:06 2008
New Revision: 23768
URL: http://svn.erp5.org?rev=23768&view=rev
Log:
a small optimisation.
Modified:
erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
Modified: erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py?rev=23768&r1=23767&r2=23768&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py (original)
+++ erp5/trunk/products/ERP5Type/CachePlugins/DistributedRamCache.py Tue Sep 23 17:14:06 2008
@@ -85,9 +85,7 @@
## such behaviour when constructing cache_id we add scope in front
cache_id = "%s.%s" %(scope, cache_id)
## memcached will fail to store cache_id longer than MEMCACHED_SERVER_MAX_KEY_LENGTH.
- if len(cache_id) > MEMCACHED_SERVER_MAX_KEY_LENGTH:
- cache_id = cache_id[:MEMCACHED_SERVER_MAX_KEY_LENGTH]
- return cache_id
+ return cache_id[:MEMCACHED_SERVER_MAX_KEY_LENGTH]
def get(self, cache_id, scope, default=None):
cache_storage = self.getCacheStorage()
More information about the Erp5-report
mailing list