I have a system that runs with Apache - APC is enabled and SLI is on
My Intention:
I use several crons to update stuff, once this cron has taken place it also clears certain cache related to these updates. This was all working fine when I was using curl to open the file however I decided to switch to make this via the cron itself by enabling APC SLI in the configuration.
The Problem: The cron works perfectly fine, no errors no nothing, however it does not clear the cache, is there certain code related to this that has to be changed if I want to use it in SLI rather then curl?
This is the code:
$deletesallupdates = new APCIterator('user', '/^USER.updates/', APC_ITER_VALUE);
apc_delete($deletesallupdates);
My APC configuration:
[APC]
extension = apc.so
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 1024M
apc.max_file_size = 2M
apc.stat = 1
apc.enable_cli = 1
Have you tried using apc_clear_cache? And have you tried Zend OpCache (available for PHP 5.2 and newer)? That one has more precise functions to manage your cache.