summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-10 11:09:03 +0000
committerSarven Capadisli <csarven@status.net>2010-02-10 11:09:03 +0000
commit3d0bc1a3dd16826bf89286f37aa3778e93a34b6b (patch)
tree917cbd6dde0d9b47497def39e9dcf12e5433e544 /scripts
parentf3c2dfacf4b3b1ce44edcb82d8e76e75e2b7c9fa (diff)
parente8428d1d525677fa116236735a43e7b49e8a3fd3 (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'scripts')
-rw-r--r--scripts/decache.php8
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();