Re: cache_lite cleanup problem
| From: | Jason Chancellor | Date: | Wed, 24 May 2006 21:12:50 +0000 |
| Subject: | Re: cache_lite cleanup problem | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-24144@lists.php.net to get a copy of this message | ||
Yes, it never prints Cache Miss, and the cache file never get deleted.
I would assume that I would get a Cache Miss after 10 seconds, but thats
not the case for some reason.
"Pierre" <pierre.php@gmail.com> wrote in message
news:fe05d1540605241407r214dc592p35dbdfc84434360d@mail.gmail.com...
On 5/23/06, Jason Chancellor <jc_groups@aoasoftware.com> wrote:
> <--SNIP -->
Yes, the get method will check the expiration.
Do you mean that you never reached "Cache Miss"?
--Pierre
The code
> //-----------
> require_once "Cache/Lite.php";
>
> $options = array(
> 'cacheDir' => "c:/temp/results/",
> 'lifeTime' => 10,
> 'pearErrorMode' => CACHE_LITE_ERROR_DIE,
> 'automaticSerialization' => TRUE,
> 'automaticCleaningFactor' => 2
> );
>
> $cache = new Cache_Lite($options);
>
> //Save the cache
> if (isset($_REQUEST["save"]))
> {
> $cache->save("hi", "CACHEABC", "GROUP123");
> print "Saved"."<br>";
> return;
> }
>
> //Print out cache
> if ( $cacheData = $cache->get("CACHEABC", "GROUP123") )
> {
> print "Cache Hit: ".$cacheData."<br>";
> }
> else
> {
> print "Cache Miss"."<br>";
> }
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>