I want to create a small plugin to automatically purge the APC opcode cache after specific actions in the Wordpress admin interface. This is necessary if e.g. apc.stat is set to 0, as a change to a file then doesn't reset its cache value in the opcode cache and so calls will use the old, cached, out-of-date file. Total debug nightmare if you forget to clear the cache manually.
Is there an easy way to find out if an action edited/changed a file?
I could manually check if is_admin and POST and file is e.g. theme-editor.php, but this seems like a not very nice hack that is bound to miss some things.