X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=scripts%2Fshowcache.php;h=991105454eab6fd2c477f5491cbad195f750f757;hb=364b8e308babfaeb64e5ba45e4df9aa881ac9d97;hp=fb0ccb5e03154e126cae43ab00f224f8ab04bf3a;hpb=aeca8807dbce951beccbc3fb0e5a4ae5600e5e5f;p=quix0rs-gnu-social.git
diff --git a/scripts/showcache.php b/scripts/showcache.php
old mode 100644
new mode 100755
index fb0ccb5e03..991105454e
--- a/scripts/showcache.php
+++ b/scripts/showcache.php
@@ -18,16 +18,17 @@
* along with this program. If not, see .
*/
-define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('INSTALLDIR', dirname(__DIR__));
+define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
-$shortoptions = "t:c:v:k:";
+$shortoptions = "t:l:v:k:";
$helptext = <<
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
@@ -38,13 +39,13 @@ require_once INSTALLDIR.'/scripts/commandline.inc';
$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,7 +56,7 @@ if (!empty($karg)) {
print "Checking key '$k'...\n";
-$c = common_memcache();
+$c = Cache::instance();
if (empty($c)) {
die("Can't initialize cache object!\n");
@@ -69,4 +70,3 @@ if (empty($obj)) {
var_dump($obj);
print "\n";
}
-?>