简体   繁体   中英

how to exclude .php file from APC cache?

I cache top users data in a file named top_users.php, let us call it file cache.

But the APC will cache all the .php files, how to exclude some special .php file from APC

cache?

You can use filters in your apc config file:

apc.filters = "-/usr/share/files/.*"

This would not cache files under that match that pattern basically any file under that path /usr/share/files/

For you, you could use:

apc.filters = "-/my/share/top_users\.php"

Check this out http://www.php.net/manual/en/apc.configuration.php#ini.apc.filters

This assumes the file is being required or included by absolute path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM