[ZODB-Dev] zeo.memcache
Pedro Ferreira
jose.pedro.ferreira at cern.ch
Wed Oct 5 12:40:46 UTC 2011
Hello all,
While doing some googling on ZEO + memcache I came across this:
https://github.com/eleddy/zeo.memcache
Has anybody ever tried it?
I gave it a short try and after fixing a small issue with a return value
(pull request sent) I managed to make it run. Despite some random errors
related with TIDs (which should be simple to solve[?]) it seems to work
OK. The decrease in loading time for very heavy pages is pretty
noticeable for Indico, with the additional advantage that the cache can
be shared cross-process and even cross-machine.
There is a small issue in the way ClientStorage initializes the client
cache that seems to have got in the way of the original developer and
that I bumped into while trying to initialize the memcached cache
without having to hardcode the server address:
"""
if client is not None:
dir = var or os.getcwd()
cache_path = os.path.join(dir, "%s-%s.zec" % (client, storage))
else:
cache_path = None
self._cache = self.ClientCacheClass(cache_path, size=cache_size)
"""
could this be done such that the constructor argument for
ClientCacheClass can be specified in a less restrictive way? For
instance, by directly passing `client` and building the cache path
inside the constructor? That would help a lot.
Cheers,
Pedro
--
José Pedro Ferreira
Software Developer, Indico Project
http://indico-software.org
+-----------+
+ '``'--- `+ CERN - European Organization for Nuclear Research
+ |CERN| / + 1211 Geneve 23, Switzerland
+ ..__. \. + IT-UDS-AVC
+ \\___.\ + Office: 513-1-005
+ / + Tel. +41227677159
+-----------+
More information about the ZODB-Dev
mailing list