Re: [need for advices] fastCaching
| From: | Tomas V.V.Cox | Date: | Mon, 22 Jul 2002 16:05:21 +0000 |
| Subject: | Re: [need for advices] fastCaching | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7858@lists.php.net to get a copy of this message | ||
MARTY Fabien wrote:
>
> (Tomas)
> > Yes, only one file (no other file from the Cache package required) with
> > the isCached function from every container (it should be that big, we
> > are only talking about the isCached() functionality).
>
> Ok ! But you need cache reading too !!! In the most cases (there is a
> non expired cache file), you need :
>
> - testing if there is a cache (ok for isCached)
> - testing if it's expired
> - reading the cache and return it !!!
>
> So for reading the cache, you need a read method too ! So you make a
> read() generic method and concrete readFile(), readDB(), ... method too
> ? Your minimal class will be bigger than fastCache...
>
> But maybe I'm tired and I understand anything. I'm confused.
Sorry I'm not being very clear, change isCached() with getCached(). I
cursory saw the Cache_Container_XXX::fetch() function as the only needed
thing (ok, the constructors too).
It of course may be bigger than your class, but I guess that to load a
little bit more code (still only one file) won't impact in the
performance and it will be full featured. Perhaps the point is more
oriented to simplify the Cache design instead of putting a layer on top.
Could you provide a bench test script, I'd like to try some things.
Tomas V.V.Cox