From 07c0127e924ee757b7d0ade9dfb9713c9fe051e9 Mon Sep 17 00:00:00 2001 From: Exodus4D Date: Sat, 21 Jan 2017 22:21:00 +0100 Subject: [PATCH] - new "clear cache" button for Redis added to /setup --- app/main/controller/setup.php | 9 ++++++++ public/templates/view/setup.html | 39 ++++++++++++++++++++------------ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/app/main/controller/setup.php b/app/main/controller/setup.php index 27069e55..d702b29b 100644 --- a/app/main/controller/setup.php +++ b/app/main/controller/setup.php @@ -140,6 +140,15 @@ class Setup extends Controller { // js view (file) $f3->set('jsView', 'setup'); + // set render functions (called within template) + $f3->set('cacheType', function(){ + $cacheType = $this->getF3()->get('CACHE'); + if( strpos($cacheType, 'redis') !== false ){ + $cacheType = 'redis'; + } + return $cacheType; + }); + // render view echo \Template::instance()->render( $f3->get('PATHFINDER.VIEW.INDEX') ); } diff --git a/public/templates/view/setup.html b/public/templates/view/setup.html index 84e6ae8b..25148f0e 100644 --- a/public/templates/view/setup.html +++ b/public/templates/view/setup.html @@ -938,22 +938,33 @@
+ +
+ + Redis cache + + + Clear all keys + +
+
+
- - Data - - - - {{ @cacheSize.data }} - - - 0 KB - - - - + + Data + + + + {{ @cacheSize.data }} + + + 0 KB + + + + - Clear + Delete