#!/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'.\n"; exit(1); } $result = $object->decache();