You are not logged in Log in Join
You are here: Home » Members » mrlex's Home » RAMCacheForAnonymous

Log in
Name

Password

 
 

RAMCacheForAnonymous

RAMCacheForAnonymous patch RAMCache for acting only on Anonymous User connexions. (i.e RAMCache works only when AUTHENTICATED_USER == Anonymous User)

This is done by decorating ZCache_get and ZCache_set methods of class RAMCache

PREREQUISITES

For the following it is supposed you know how the RAMCache works. A good starting point is :

  • The onlime Help of the RAMCache Object in the ZMI.
  • The Zope Book (search "ram cache") : http://zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx

INSTALL

Put RAMCacheForAnonymous in your Products directory.

Then restart your Zope server.

API

RAMCacheForAnonymous can be used for other Caches. You have to do:

        from Products.RAMCacheForAnonymous import patch_cache
        import Product.TheOtherCache
        patch_cache(Poduct.TheOtherCache)

This code may live well in the initialize() method of your own Product.

COMPATIBILITY

Tested with Zope-2.8.5

CAVEATS

The class is patched => there is no selection on which RAMCache may be patched and which not.

This Products provides a Poor Man cache design. It is not intended to replace a full featured intelligent HTTPCache + squid architecture. But provides an easy and quick way of caching Zope side.

You may additionnaly add to your RAM Cache the following REQUEST variables via ZMI :

  • HTTP_ACCEPT_CHARSET
  • HTTP_ACCEPT_LANGUAGE

BENEFITS

The RAM used is very low as this patch takes care of not storing data for any non Anonymous User. Installation is pretty simple.

AUTHOR

Alexandre SAUVE - mr dot lex at free dot fr

Latest Release: 1.0.0
Last Updated: 2006-04-21 07:50:06
Author: mrlex
License: ZPL
Categories:
Maturity: Stable
  Information

Available Releases

Version Maturity Platform Released
RAMCacheForAnonymous-1.0.0 Stable   2006-04-21 07:50:06
  RAMCacheForAnonymous-1.0.0.tar.gz (3 K) All md5