Browse files

The if statement that was supposed to check if the Magento cache type…

… was set to the string "varnish", actually set the cache type to "varnish".

This resulted in that the Varnish cache was always purged, when some other cache type was purged.
  • Loading branch information...
1 parent eb3df7f commit a923e7f23a8dadf0aea6a66b82ce60346e590489 @chroth chroth committed Dec 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/Varnish/controllers/CacheController.php
View
2 code/Varnish/controllers/CacheController.php
@@ -11,7 +11,7 @@ public function massRefreshAction(){
$types = $this->getRequest()->getParam('types');
if (Mage::app()->useCache('varnish') ) {
- if( (is_array($types) && in_array('varnish', $types)) || $types="varnish") {
+ if( (is_array($types) && in_array('varnish', $types)) || $types == "varnish") {
Mage::helper('varnish')->purgeAll();
$this->_getSession()->addSuccess(Mage::helper('adminhtml')->__("Varnish cache type purged ."));
}

0 comments on commit a923e7f

Please sign in to comment.