apc_delete_file() ?

From: Date: Wed, 14 May 2008 15:39:31 +0000
Subject: apc_delete_file() ?
Groups: php.apc.dev 
Request: Send a blank email to php-apc-dev+get-123@lists.php.net to get a copy of this message
I'd like to add a function that removes a specific compiled file from the cache. My initial thought is to have the function, given a filename: - use apc_cache_make_file_key() to determine the cache key for the filename - use apc_cache_find_slot() to determine the slot for the cache key - call remove_slot() on the slot to either free it immediately or put it on the deleted list if its refcount is > 0 - and optionally have the function call process_pending_removals() to flush the deleted list (if possible) Another possibility, more useful for bulk deletes (at least on fullpath entries) could be something like apc_delete_file($pattern) which deletes all files whose names match a given pattern. This could work internally like apc_cache_clear() except that before calling remove_slot() on a particular slot, it would compare the pattern to the fullpath in the key and only remove if it matches. Do either/both of these approachese sound reasonable? Something obvious I'm missing? Thanks, David

« previous php.apc.dev (#123) next »