/
default.php
45 lines (39 loc) · 1.2 KB
/
default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* @version $Id: sections.php 592 2011-03-16 00:30:35Z johanjanssens $
* @category Nooku
* @package Nooku_Server
* @subpackage Cache
* @copyright Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.nooku.org
*/
/**
* Cache Default Controller
*
* @author Johan Janssens <http://nooku.assembla.com/profile/johanjanssens>
* @category Nooku
* @package Nooku_Server
* @subpackage Cache
*/
class ComCacheControllerDefault extends ComDefaultControllerDefault
{
protected function _actionPurge(KCommandContext $context)
{
//Purge the cache
if(JFactory::getCache('')->gc()) {
$this->_redirect_message = JText::_( 'Expired items have been purged' );
} else {
$this->_redirect_message = JText::_('Error purging expired items');
}
$this->_redirect = KRequest::url();
return true;
}
public function getRequest()
{
$request = parent::getRequest();
//Force the site
$request->site = KFactory::get('joomla:application')->getSite();
return $request;
}
}