Created
March 4, 2013 04:07
-
-
Save emptyhua/5079839 to your computer and use it in GitHub Desktop.
PHP中注册退出hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function memcache_lock_clean() { | |
global $memcache_locks; | |
$mem = require_memcache(); | |
foreach($memcache_locks as $key=>$v){ | |
$mem->delete('LOCK' . $key); | |
} | |
} | |
register_shutdown_function('memcache_lock_clean'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment