Index: branches/RC/tools/show_cache.php =================================================================== diff -u -N --- branches/RC/tools/show_cache.php (revision 0) +++ branches/RC/tools/show_cache.php (revision 11039) @@ -0,0 +1,54 @@ +Init(); + +$show_var = $application->GetVar('show_var'); + +if ($show_var) { + $sql = 'SELECT Data + FROM ' . TABLE_PREFIX . 'Cache + WHERE VarName = "' . $show_var . '"'; + $var_data = $application->Conn->GetOne($sql); + + if ($var_data === false) { + echo 'Not Found'; + } + else { + print_pre( unserialize($var_data), 'Cache "' . $show_var . '" content:', true); + } +} +else { + $sql = 'SELECT VarName + FROM ' . TABLE_PREFIX . 'Cache'; + + $var_names = $application->Conn->GetCol($sql); + + foreach ($var_names as $index => $var_name) { + $var_names[$index] = '' . $var_name . ''; + } + + print_pre( $var_names, 'Cache variable names:', true); +} + +$application->Done(); + +$end = getmicrotime(); + +function getmicrotime() +{ + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); +} +?> \ No newline at end of file