diff options
author | Brion Vibber <brion@pobox.com> | 2010-02-08 15:48:52 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-02-08 15:48:52 -0800 |
commit | b2e8d8407cc7f1abb5e8767cd3403ac356775eaa (patch) | |
tree | 5cfaed5f1f21a697e147b41695c7e8c5282324a3 /scripts | |
parent | 3833dc8c1f3f9ba5e3b12bf2715e4a4fb3adabf1 (diff) | |
parent | 4e6f587f868d71f08c618d0dedf6ddf0331619c2 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/decache.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/decache.php b/scripts/decache.php index 7cabd78ad..094bdb5aa 100644 --- a/scripts/decache.php +++ b/scripts/decache.php @@ -24,6 +24,8 @@ $helptext = <<<ENDOFHELP USAGE: decache.php <table> <id> [<column>] Clears the cache for the object in table <table> with id <id> If <column> 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(); |