Skip to content

Instantly share code, notes, and snippets.

@hornofj
Created December 7, 2012 15:32
Show Gist options
  • Save hornofj/4233993 to your computer and use it in GitHub Desktop.
Save hornofj/4233993 to your computer and use it in GitHub Desktop.
Clear APC
<?php
if (function_exists('apc_clear_cache') && $_GET['pass'] == 'SomePassword' && $_SERVER['REMOTE_ADDR']=='127.0.0.1') {
if (apc_clear_cache() && apc_clear_cache('user'))
print 'All Cleared!';
else
print 'Clearing Failed!';
print '<pre>';
print_r(apc_cache_info());
print '</pre>';
} else {
header('HTTP/1.0 404 Not Found', true, 404);
die();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment