phpperformancecachingapc

How to clear APC cache entries?


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?


Solution

  • 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.