I don't think STAT cache and realpath have to necessarily be merged because there's a big difference. stat()'s do change periodically (i.e. it's very common) as opposed to realpath() which don't. That said, I think if we add cache_flush() for the stat() cache, I see no problem with it also flushing the realpath() cache so your API suggestion looks fine to me.

Andi

At 12:39 AM 9/28/2004 +0200, Christian Schneider wrote:
Sara Golemon wrote:
protocol wrappers (many of which are network based). I think it'd make sense
to allow clearstatcache() to selectively clear all cache entries, or only
entries for wrappers which do not have the is_url bit set.

Maybe this should be generalized to a cache_flush() function with e.g. two optional parameters: Cache type to flush and object to flush from cache.


Something like
cache_flush(); # Same as flushcache(CACHE_ALL)
cache_flush(CACHE_STAT) # Same as clearstatcache()
cache_flush(CACHE_REALPATH);
cache_flush(CACHE_REALPATH, $path);

Caches can help, they can also confuse you and be in the way and you need control over them. With a reasonable interface.

I'd also propose to disable caching in the default ini file as according to my observations most users are not pushing their servers to the limit but they do get nailed by strange bugs due to caching artefacts.

- Chris

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to