views:

66

answers:

1

Hi,

If I run the following PHP code:

apc_compile_file("relative/path/to/file");

will it invalidate the in-memory cache that is used for this particular file?

That is, if I first access /path/to/file, APC will compile it, and cache the OpCode in memory. Now, if I access /path/to/file again, APC will just use the cached OpCode. However, if I modify this file and apc.stat is set to 0 (off), it will use the OpCode from the memory, although the file was modified (because apc.stat was off). My question is that if I run apc_compile_file() for the file after updating it, will the memory cache get updated?

+1  A: 

Yes, apc_compile_file() will force APC to update its cache if the file has already been cached automatically.

Check this bug report:

http://pecl.php.net/bugs/bug.php?id=11857

Inspire