Hi

Now it works brilliantly. Thanks!

Bartosz

2007/2/8, Fabien MARTY <[EMAIL PROTECTED]>:
http://framework.zend.com/issues/browse/ZF-877

2007/2/8, Bartosz Maciaszek <[EMAIL PROTECTED]>:
> Hi
>
> Actually if I set 'lifeTime' to 'null' expireTime seems to be set to
> 9999999999 in Cache/Backend/File.php around line 487:
>
>     private function _expireTime($lifeTime)
>     {
>         if (is_null($this->_directives['lifeTime'])) {
>             return 9999999999;
>         }
>         return time() + $lifeTime;
>     }
>
> and then it writes results to file zend_cache---CACHE_ID---9999999999
> and expireTime is taken from the filename in the same file:
>
>     private function _fileNameToExpireField($fileName)
>     {
>         $prefix = $this->_options['fileNamePrefix'];
>         return preg_replace('~^' . $prefix . '---.*---(\d*)$~', '$1',
> $fileName);
>     }
>
> Even if I change something in masterfile, its modification time is not
> taken into consideration. In result I get something like '2147483647'
> in fronend's test() method (variable $lastModified):
>
> $lastModified = parent::test($id);
>
> --
> Regards
> Bartosz.
>
> 2007/2/8, Fabien MARTY <[EMAIL PROTECTED]>:
> > ---------- Forwarded message ----------
> > From: Fabien MARTY <[EMAIL PROTECTED]>
> > Date: 8 févr. 2007 18:37
> > Subject: Re: [fw-general] Zend_Cache - Caching files to files
> > To: Bartosz Maciaszek <[EMAIL PROTECTED]>
> >
> >
> > Hi,
> >
> > > Anyway, thanks for fixes, but it still doesn't work as expected.
> > > Frontend 'File' is little bit different than others as cache validity
> > > should be calculated basing on master file's modification time and not
> > > on specific validity time. Now, disregarding of which frontend is used
> > > when fourth parameter is not specified cache validity time is 3600
> > > seconds.
> >
> > So it's correct.
> >
> > With File backend, a cache record is valid until :
> > - the lifetime expired
> > OR
> > - the master file was modified
> >
> > If you don't want any lifeTime, set a frontend option like :
> >
> > $frontendOptions = array(
> >     'lifeTime' => null
> > );
> >
> >
> > Regards
> > --
> > Fabien MARTY
> > [EMAIL PROTECTED]
> >
> >
> > --
> > Fabien MARTY
> > [EMAIL PROTECTED]
> >
>


--
Fabien MARTY
[EMAIL PROTECTED]



--
Pozdrawiam
Bartosz Maciaszek

Reply via email to