Re: Output_Cache Module

From: Date: Thu, 22 Feb 2001 09:41:02 +0000
Subject: Re: Output_Cache Module
References: 1  Groups: php.pear 
Request: Send a blank email to php-pear+get-1428@lists.php.net to get a copy of this message
Hi After we have clarified some missunderstandings, we can come to the core :) As i wrote yesterday, I wrote two caching classes. one which caches the entire output (the html-file, the visitor normally gets) into a db, the other class into a file-system. they are far from perfect, but they work. see http://www.nomad.ch/php for the sourcecode (there are .phps files now....) > - store data in a data container (shared > memory, DB, ...) i have db and filesystem, no idea about shared memory. they are in two different classes, to have it in one would be great :) > - only store it if some conditions are > true (specific timestamp is reached, > caching data should be only valid for > X seconds etc.) not yet, but is planned very soon. > - ability to flush the cache explicitely at the moment, just delete the cached file or the entry in the db. > - retrieve the data from the container does it. > - provide an easy API to store datas of > various types (no matter if it is an > object, integer, hash or something else) it only stores output generated between the start and end function. i use the ob_ functions from php for that. > - get the status of a data container ("valid", > "expired", "empty", ...) not yet. > - 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 md5 is used. an URI is the input. the md5 of it is stored. > > - 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) öhm, far from being implemented in my code :) i'd happy to see the code improve and to get more features into it. Maybe we get soon a really good PEAR-Caching-System. chregu -- >> NOMAD MEDIA CORPORATION AG >> christian stocker >> e-mail: chregu@nomad.ch >> schöneggstrasse 5 >> mobile: +41 76 561 88 60 >> ch-8004 zürich >> office: +41 1 240 23 04 >> web: http://www.nomad.ch >> fax : +41 1 240 23 71

« previous php.pear (#1428) next »