[ZODB-Dev] Finding out whether an object is in the ZEO or ZODB cache.

Arnar Lundesgaard arnar.lundesgaard@creuna.no
Wed, 21 Aug 2002 13:48:26 +0200


Hi,=20

 we have been trying to set up a ZEO cluster using Squid for load
balancing with ICP as described in

   http://www.zope.org/Members/htrd/icp/intro.


Under the heading 'When does Zope say ICP_HIT', there are listed
a few possibilities for optimizations. On that page Toby Dickenson
mentions

"""
 - If some methods require a large persistent object that will take a
   long time to transfer from the ZEO server, you might say ICP_HIT if
   that object is already in the ZEO cache.

 - If some methods require an object that will take a long time to
   unpickle, you might want to say ICP_HIT if that object is already in
   the ZODB cache.
"""

The question is: "How can we know if the object is in the ZEO or ZODB
cache when all we have from the ICP request is the URL?"

As far as we can tell the cache only stores an OID. However, the lower
layers of ZODB are unfortunately still black magic to us. We where
hoping that there is a way to find this out without having to traverse
the path and wake the object we want to test.


I hope this is the appropriate mailinglist for this enquiry.

  Arnar Lundesgaard


-------------------------------------
phone: (+47) 982 38 036
mailto:arnar.lundesgaard(at)creuna.no
Creuna as
Bryggegata 3
NO-0250 Oslo
phone office: (+47) 23 23 88 00
fax: (+47) 23 23 88 50
http://www.creuna.no/