You are not logged in Log in Join
You are here: Home » Members » andym » File System Cache Manager » dc_view

Log in
Name

Password

 
 


Dublin Core Elements

The Dublin Core metadata element set is a standard for cross-domain information resource description.
Element Description Value
Identifier resource ID http://old.zope.org/Members/andym/FSCacheManager
Title resource name File System Cache Manager
Description resource summary <h1>FS Cache Manager</h1> <p> An alternative approach to caching web sites. There are three main ways of caching a web site at the moment, using a HTTP Accelerated Cache Manager, a RAM Cache Manager and using an external proxy to do the caching such as Squid or Apache. This is just another approach, its not exactly a brilliant approach and like all the others its not perfect but it is very fast and easy to set up. For alternatives see the bottom of this page.</p> <h2> How it works.</h2> <p> Whilst exploring with using IIS as a proxy for Zope some people found the <a href="http://www.zope.org/Members/andym/ASP404">ASP 404 script</a> is a whopping 2x as fast as PCGI for IIS. And that got Alan Runyan and I thinking about this. It seemed like a daft way to go but apparently this is how Vignette and some other CMS's approach the problem.</p> <p> <strong>Note:</strong> <em>this cache manager requires another web server such as Apache or IIS</em></p> <ul> <li>There is an incoming request to your web server (Apache or IIS). <ul> <li>The web server fails to find the page on the file system so proxies to Zope. </li> <li>The object is rendered served back through the proxy. If your object in Zope is assigned to an FSCache it is written to the file system.</li> </ul> </li> <li>Next request comes in. <ul> <li>Your web server finds the object on the file system and renders it back</li> <li>.. and repeat</li> </ul> </li> <li>You change the object in Zope <ul> <li>It invalidates the object and deletes from the file system</li> </ul> </li> <li>Next request comes in, back to the top...</li> </ul> <h2> Setting this up</h2> <p> Obviously this system only works with a web server that gives you this flexibility and you have static pages to render. In IIS use the ASP 404 script as mentioned above. You can do this in Apache using the RewriteCond directive, eg: <pre> RewriteEngine On DocumentRoot "E:/ZenSkin/FSCache" RewriteCond E:/ZenSkin/FSCache%{REQUEST_FILENAME} !-f # file not found so # do my rewrite as usual # blah, blah RewriteRule ^/(.*) http://books.agmweb.ca:84/... </pre> </p> <h2> Advantages</h2> <ul> <li>Easy to mix static and dynamic sites</li> <li>Very easy to use</li> <li>You can set caching policy on your objects in Zope</li> <li>Survives reboots, dead zope and so on...</li> </ul> <h2> Disadvantages</h2> <ul> <li>Serving from a memory cache is faster</li> <li>You dont really have control over cache object life.</li> </ul> <h2> Installation</h2> <ul> <li>Ungzip and untar the product into your Zope products directory</li> <li>Restart Zope</li> <li>Add a FSCacheManager, assign objects to it.</li> <li><strong>Changing storage directories</strong> must be done on the file system, by altering FSMappings.py. This is done for your security so people can't select a directory for you. Instructions are in FSMappings.py. After altering there you must restart or refresh.</li> </ul> <h2> Alternatives</h2> <ul> <li>Storing your content on the file system and serving it from the web server straight away</li> <li>Using Squid or Apache and setting cache headers on objects and configuring your web server</li> <li>Using sync software such as CMFDeployment, wget and so on. </li> </ul>
Creator resource creator ZopeOrgSite
Date default date 2002-11-29 16:16:43
Format resource format text/html
Type resource type Software Package
Subject resource keywords Server
Contributors resource collaborators
Language resource language
Publisher resource publisher No publisher
Rights resource copyright


Additional Zope Elements

Element Description Value
CreationDate date resource created 2002-11-29 16:16:43
ModificationDate date resource last modified 2002-11-29 16:16:43
EffectiveDate date resource becomes effective None
ExpirationDate date resource expires None

Backlinks: via Google / Technorati