i would like to reiterate the point made by Glen @ 31-Mar-2009 10:44...
this function is extremely useful if one would like to enable apc.stat=0.
we saw quite a big performance increase by enabling apc.stat=0. and since purging the cache every time we push a file from beta to live, or restarting apache is out of the question, this function comes in handy.
the idea should be obvious to most, but, just in case:
a) push file from beta to live.
b) at this point, the opcode cache still has an 'old' copy of the file cached.
c) run apc_compile_file on the updated file.
d) at this point, the new version of the file is now in the opcode cache, the opcode cache is left untouched except for the single file that one has updated, and one is able to use apc.stat=0 and avoid all those (which are said to be rather expensive) stat calls.
this was mentioned in a small amount of detail at oscon 2009 (http://prezi.com/re8rsdjmpkko/oscon-09-high-performance-apc/)
all due credit goes to glen, thanks!
this function must be called by an interface (perhaps im using the wrong terminology... cgi, cli, etc) that supports / has apc enabled.
so running this from a cli based script wont work... and will return false on every file you try to push to the opcode cache.
unless you have apc.enable_cli=1 set, (i'm guessing here, still untested, but that would make sense...).
--was--
i would like to reiterate the point made by Glen @ 31-Mar-2009 10:44...
this function is extremely useful if one would like to enable apc.stat=0.
we saw quite a big performance increase by enabling apc.stat=0. and since purging the cache every time we push a file from beta to live, or restarting apache is out of the question, this function comes in handy.
the idea should be obvious to most, but, just in case:
a) push file from beta to live.
b) at this point, the opcode cache still has an 'old' copy of the file cached.
c) run apc_compile_file on the updated file.
d) at this point, the new version of the file is now in the opcode cache, the opcode cache is left untouched except for the single file that one has updated, and one is able to use apc.stat=0 and avoid all those (which are said to be rather expensive) stat calls.
this was mentioned in a small amount of detail at oscon 2009 (http://prezi.com/re8rsdjmpkko/oscon-09-high-performance-apc/)
all due credit goes to glen, thanks!
http://php.net/manual/en/function.apc-compile-file.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.