[Zope-PAS] PAS Caching (sucks)

Jens Vagelpohl jens at dataflake.org
Sat Jul 29 10:28:23 EDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Even though I am the perpetrator, I think the current way of caching,  
using ZCacheable and RAM cache managers, is absolutely horrific. It's  
cumbersome to set up and the ZCacheable API is ugly as sin using it  
from code. I think simplification is needed.

I personally don't see any need to have caching in plugins  
themselves. Instead, caching should be applied at the "gateway" into  
the user folder, where it emits user objects. These user objects  
should be cached as a whole. I am envisioning a thread-independent  
cache (meaning no redundant lookups in each thread) that is  
configured using a caching ZMI tab on the PAS instance. No more Cache  
tab everywhere and no more RAM cache managers to configure. And no  
more contortions in plugin code to utilize ZCacheable.

This model is the exact same model used in the LDAPUserFolder itself.  
The caching mechanism in the LDAPUserFolder contains two thread- 
independent "bags" where unwrapped users are stored: One exclusively  
for user objects generated from "passwordless" lookups, such as calls  
to getUser or getUserById and friends, and those generated by lookups  
that provide passwords. In this particular application having two  
user caches is simply an artifact of my slight abuse of getUser, so  
it might end up different in PAS.

Who's got an opinion?

jens

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFEy3CIRAx5nvEhZLIRArwVAJ9V4hJ6dR4B7CE7p7E/v56oaolL+QCfX3OQ
yJmjbx2cNCSp2KFBEMTveLo=
=meix
-----END PGP SIGNATURE-----


More information about the Zope-PAS mailing list