From f0f9435248b909375dc70b08d715577d77302bc5 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 7 Sep 2011 16:54:03 -0400 Subject: [PATCH] one too many cache-clearing scripts. --- scripts/decache.php | 54 --------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 scripts/decache.php 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();