@@ 217-223 (lines=7) @@ | ||
214 | $size = round((int)$stats['size'] / (1024*1024), 2); |
|
215 | ||
216 | // check if submited |
|
217 | if ($this->request->request->get('clearcache', false)) { |
|
218 | // clear cache |
|
219 | App::$Cache->clean(); |
|
220 | // add notification & redirect |
|
221 | App::$Session->getFlashBag()->add('success', __('Cache cleared successfully')); |
|
222 | $this->response->redirect('/'); |
|
223 | } |
|
224 | ||
225 | // render output view |
|
226 | return $this->view->render('clear_cache', [ |
|
@@ 243-249 (lines=7) @@ | ||
240 | $sessions = Session::all(); |
|
241 | ||
242 | // check if action is submited |
|
243 | if ($this->request->request->get('clearsessions', false)) { |
|
244 | // truncate table |
|
245 | App::$Database->table('sessions')->truncate(); |
|
246 | // add notification and make redirect to main |
|
247 | App::$Session->getFlashBag()->add('success', __('Sessions cleared successfully')); |
|
248 | $this->response->redirect('/'); |
|
249 | } |
|
250 | ||
251 | // render output view |
|
252 | return $this->view->render('clear_sessions', [ |