From: Evan Prodromou Date: Wed, 7 Sep 2011 20:54:03 +0000 (-0400) Subject: one too many cache-clearing scripts. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f0f9435248b909375dc70b08d715577d77302bc5;p=quix0rs-gnu-social.git one too many cache-clearing scripts. --- diff --git a/scripts/decache.php b/scripts/decache.php deleted file mode 100644 index 094bdb5aa0..0000000000 --- a/scripts/decache.php +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env php -. - */ - -define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); - -$helptext = << [] -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'; - -if (count($args) < 2 || count($args) > 3) { - show_help(); -} - -$table = $args[0]; -$id = $args[1]; -if (count($args) > 2) { - $column = $args[2]; -} else { - $column = 'id'; -} - -$object = Memcached_DataObject::staticGet($table, $column, $id); - -if (!$object) { - 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();