Re: clearstatcache change
| From: | Arnaud Le Blanc | Date: | Wed, 06 Aug 2008 19:00:59 +0000 |
| Subject: | Re: clearstatcache change | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39712@lists.php.net to get a copy of this message | ||
On Wednesday 06 August 2008 19:56:58 Arnaud Le Blanc wrote:
> Hi,
>
> On Wednesday 06 August 2008 18:18:49 Jani Taskinen wrote:
> > Rasmus Lerdorf wrote:
> > > I think we either need to make clearstatcache() not affect the realpath
> > > cache, or we should add an optional argument to it to specify whether
> > > or not the realpath cache should be cleared as well.
> >
> > See this: http://bugs.php.net/39367
> >
> > Considering some people seem to want to clear realpath cache as well, I'd
> > make it an optional parameter which defaults to NOT clear realpath cache:
> >
> > clearstatchache(true); /* BOOM! realpath cache gone.. */
> >
> > btw. I just noticed chroot() calls this
> > realpath_cache_clean()..intentional? Also some streams stuff uses the
> > php_clear_stat_cache() func but those should propably use the
> > realpatch_cache_del() instead and not blow away whole cache?
>
> Yes, I think too.
> I added that to your patch:
>
> http://arnaud.lb.s3.amazonaws.com/clearstatcache_optional_params.patch
> :)
>
> It also adds the "filename" argument to
> clearstatcache([bool clear_realpath_cache[, filename]])
I reply to myself, actually this may cause troubles to not clear the full
cache in plain_wrapper.c :/ I updated the patch, just left the filename
argument to clearstatcache().
>
> > Here is a patch to add that optional parameter (for PHP_5_3):
> >
> >
> > http://pecl.php.net/~jani/patches/clearstatcache_optional_param.patch
> >
> > --Jani