Dokümantasyonu apc.enable_cli
, which control whether APC should be activated in CLI mode, says (quoting):
Mostly for testing and debugging.
Setting this enables APC for the CLI
version of PHP. Under normal
circumstances, it is not ideal to
create, populate and destroy the APC
cache on every CLI request, but for
various test scenarios it is useful to
be able to enable APC for the CLI
version of PHP easily.
Belki APC bellekte opcodes depolar, ancak PHP yürütülebilir komut sonunda ölür gibi, bu hafıza kaybolur: Bu komut yürütmeler arasında kalıcı değildir.
Yani APC opcode önbellek CLI modunda yararsız: PHP hala PHP'nin yürütülebilir başlatılan her zaman OpCodes yeniden derlemek kaynak zorunda kalacak gibi, hiçbir şey optimize.
Actually, APC doesn't "optimize" : the standard way of executing a PHP script is like this :
- dosyasını okuyun ve opcodes içine derlemek
- opcodes yürütmek
APC ne bellekte opcodes mağaza, yani bir PHP komut dosyası yürütme olur:
- bellekten opcodes okunan (much faster than compiling the source-code)
- opcodes yürütmek
But this means you must have some place in memory to store the opcodes. When running PHP as an Apache module, Apache is responsible for the persistence of that memory segment... When PHP is run from CLI, there is nothing to keep the memory segment there, so it is destroyed at the end of PHP's execution.
(I don't know how it works exactly, but it's something like that, at least in the principles, even if my words are not very "technical" ^^ )
Or, by "optimization" you mean something else than opcode cache, like the configuration directive apc.optimization ? If so, this one has been removed in APC 3.0.13