Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@

class Nexcessnet_Turpentine_Adminhtml_CacheController extends Mage_Adminhtml_CacheController
{
public function indexAction()
{
$allTypes = Mage::app()->useCache();

$turpentineEnabled = ($allTypes['turpentine_pages'] == 1) || ($allTypes['turpentine_esi_blocks'] == 1);
$fullPageEnabled = (array_key_exists('full_page', $allTypes)) && ($allTypes['full_page'] == 1);

if ($fullPageEnabled && $turpentineEnabled) {
$allTypes['full_page'] = 0;
Mage::app()->saveUseCache($allTypes);

Mage::getSingleton('core/session')->addWarning(
Mage::helper('adminhtml')->__('Both Varnish and Full Page caches were enabled. Full Page cache has now been disabled.')
);

$this->_redirect('*/*');
return;
}

parent::indexAction();
}

/**
* Mass action for cache enabeling
Expand Down
1 change: 1 addition & 0 deletions app/code/community/Nexcessnet/Turpentine/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@
<args>
<modules>
<turpentine after="Mage_Adminhtml">Nexcessnet_Turpentine</turpentine>
<turpentine_admin before="Mage_Adminhtml">Nexcessnet_Turpentine_Adminhtml</turpentine_admin>
</modules>
</args>
</adminhtml>
Expand Down