]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/showcache.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / scripts / showcache.php
index 6b00a8f7bf797be9a79339084a4520df23d5afca..b4fe7b63ce9601b8c9d67648597a6bec63e1ce99 100644 (file)
 
 define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
 
-$shortoptions = "t:c:v:k:";
+$shortoptions = "t:l:v:k:";
 
 $helptext = <<<ENDOFHELP
 USAGE: showcache.php <args>
 shows the cached object based on the args
 
   -t table     Table to look up
-  -c column    Column to look up, default "id"
+  -l column    Column to look up, default "id"
   -v value     Value to look up
   -k key       Key to look up; other args are ignored
 
 ENDOFHELP;
 
-require_once INSTALLDIR.'/scripts/commandline.inc';
+require_once INSTALLDIR.'/scripts/commandline.inc.php';
 
 $karg = get_option_value('k');
 
 if (!empty($karg)) {
-    $k = common_cache_key($karg);
+    $k = Cache::key($karg);
 } else {
     $table = get_option_value('t');
     if (empty($table)) {
         die("No table or key specified\n");
     }
-    $column = get_option_value('c');
+    $column = get_option_value('l');
     if (empty($column)) {
         $column = 'id';
     }
@@ -55,10 +55,10 @@ if (!empty($karg)) {
 
 print "Checking key '$k'...\n";
 
-$c = common_memcache();
+$c = Cache::instance();
 
 if (empty($c)) {
-    die("Cannot initialize cache object!\n");
+    die("Can't initialize cache object!\n");
 }
 
 $obj = $c->get($k);