Re: Output_Cache Module

From: Date: Thu, 22 Feb 2001 09:24:42 +0000
Subject: Re: Output_Cache Module
References: 1 2 3 4 5  Groups: php.pear 
Request: Send a blank email to php-pear+get-1427@lists.php.net to get a copy of this message
* Ulf Wendel wrote: > from the suggested Output_Cache and the Function_Cache Sebastian wrote. > The Output_Cache sounds quite similar to what Björn Schotte introduced > at his employer Well, I introduced a banner caching system with an URLCrawler (where I want to PEARify the URLCrawler), but not a generic output cache :) But we also use intensively output caches in shared memory, with the old shm_* functions. An output cache should have the following features: - store data in a data container (shared memory, DB, ...) - only store it if some conditions are true (specific timestamp is reached, caching data should be only valid for X seconds etc.) - ability to flush the cache explicitely - retrieve the data from the container - provide an easy API to store datas of various types (no matter if it is an object, integer, hash or something else) - get the status of a data container ("valid", "expired", "empty", ...) - provide a mechanism to clearly identify a data container, i.e. give it a unique "label" for easy access. The API should detect label conflicts, so for storing the data it should use unique identifiers (md5 or sth. like that) and "map" them to the identifier that was given by the software dev. who calls the API - provide a "server" mechanism with ext/sockets so that if you use shm for example, all the data is stored on a specific server and the API pulls the containers from this server which is listening on a socket port. This avoids having the same datas on each machine if you use clustered web servers (currently, in our application we have 4 web frontends) -- Björn Schotte b.schotte@pangora.com http://rent-a-phpwizard.de/ bjoern@baer.main.de Software dev advocate: http://www.advogato.org/person/baerli/

« previous php.pear (#1427) next »