X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fdecache.php;h=094bdb5aa00bd8e7f16d0938e57d51e49f61abf3;hb=122c8677b7004bae4cfe7e2bd49fc1bc3187c72c;hp=90e1ec63c0d374411af49e07c3d6fc3d8c430f13;hpb=65f784120b45dc187e28313fa2c2dca2c976c150;p=quix0rs-gnu-social.git diff --git a/scripts/decache.php b/scripts/decache.php index 90e1ec63c0..094bdb5aa0 100644 --- a/scripts/decache.php +++ b/scripts/decache.php @@ -1,8 +1,8 @@ #!/usr/bin/env php [] Clears the cache for the object in table with id If is specified, use that instead of 'id' + + ENDOFHELP; require_once INSTALLDIR.'/scripts/commandline.inc'; @@ -43,8 +45,10 @@ if (count($args) > 2) { $object = Memcached_DataObject::staticGet($table, $column, $id); if (!$object) { - print "No such '$table' with $column = '$id'.\n"; - exit(1); + print "No such '$table' with $column = '$id'; it's possible some cache keys won't be cleared properly.\n"; + $class = ucfirst($table); + $object = new $class(); + $object->column = $id; } $result = $object->decache();