How to clear APC cache entries?

lo_fye picture lo_fye · May 26, 2009 · Viewed 210.3k times · Source

I need to clear all APC cache entries when I deploy a new version of the site. APC.php has a button for clearing all opcode caches, but I don't see buttons for clearing all User Entries, or all System Entries, or all Per-Directory Entries.

Is it possible to clear all cache entries via the command-line, or some other way?

Answer

Travis Beale picture Travis Beale · May 26, 2009

You can use the PHP function apc_clear_cache.

Calling apc_clear_cache() will clear the system cache and calling apc_clear_cache('user') will clear the user cache.