diff --git a/ext/admin/main.php b/ext/admin/main.php index e0211972..0f7a99ff 100644 --- a/ext/admin/main.php +++ b/ext/admin/main.php @@ -74,6 +74,8 @@ class AdminPage extends Extension print "\t\tget a CSRF auth token\n\n"; print "\tregen-thumb \n"; print "\t\tregenerate a thumbnail\n\n"; + print "\tcache [get|set|del] [key] \n"; + print "\t\teg 'cache get config'\n\n"; } if ($event->cmd == "get-page") { global $page; @@ -105,6 +107,22 @@ class AdminPage extends Extension print("No post with ID '$uid'\n"); } } + if ($event->cmd == "cache") { + global $cache; + $cmd = $event->args[0]; + $key = $event->args[1]; + switch ($cmd) { + case "get": + var_dump($cache->get($key)); + break; + case "set": + $cache->set($key, $event->args[2], 60); + break; + case "del": + $cache->delete($key); + break; + } + } } public function onAdminBuilding(AdminBuildingEvent $event)