Filesystem 函数
在线手册:中文  英文

realpath_cache_size

(PHP 5 >= 5.3.2)

realpath_cache_sizeGet realpath cache size

说明

int realpath_cache_size ( void )

Get the amount of memory used by the realpath cache.

返回值

Returns how much memory realpath cache is using.

范例

Example #1 realpath_cache_size() example

<?php
var_dump
(realpath_cache_size());
?>

以上例程的输出类似于:

int(412)

参见


Filesystem 函数
在线手册:中文  英文

用户评论:

Stephen Pritchard from Arcanavision (2011-01-13 10:18:32)

"realpath_cache_size" is used by PHP to cache the real file system paths of filenames referenced instead of looking them up each time. Every time you perform any of the various file functions or include/require a file and use a relative path, PHP has to look up where that file really exists. PHP caches those values so it doesn’t have to search the current working directory and include_path for the file you are working on.
If your website uses lots of relative path files, think about increasing this value. What value is required can be better estimated after monitoring by how fast the cache fills using realpath_cache_size() after restarting. Its contents can be viewed using realpath_cache_get().

superaap at gmail dot com (2010-11-05 07:41:00)

Note that the realpath cache is not used if either safe_mode is on or an open_basedir restriction is in effect.
This is having a huge performance effect, causing lots of calls to lstat.
A bugreport has already been filed at http://bugs.php.net/bug.php?id=52312

易百教程