Varnish_Cache - Version 4.0.5

Version Notes

- fixed issue with caching of store switching requests
- fixed compatibility issue with older magento versions

Download this release

Release Info

Developer Magento Core Team
Extension Varnish_Cache
Version 4.0.5
Comparing to
See all releases


Code changes from version 4.0.3 to 4.0.5

README_VARNISH_CACHE.txt CHANGED
@@ -581,6 +581,12 @@ varnishlog and make sure the Vary header only looks like this:
581
 
582
  8. Changelog
583
  ============
 
 
 
 
 
 
584
  4.0.3
585
  - fixed caching issues with non default stores
586
 
581
 
582
  8. Changelog
583
  ============
584
+ 4.0.5
585
+ - fixed issue with caching of store switching requests
586
+
587
+ 4.0.4
588
+ - fixed compatibility issue with older magento versions
589
+
590
  4.0.3
591
  - fixed caching issues with non default stores
592
 
app/code/community/Phoenix/VarnishCache/Helper/Cache.php CHANGED
@@ -107,7 +107,7 @@ class Phoenix_VarnishCache_Helper_Cache extends Mage_Core_Helper_Abstract
107
  $this->setNoCacheCookie(true);
108
 
109
  // disable page caching for POSTs and no_cache parameters
110
- if ($request->isPost() || $request->getParam('no_cache') ||
111
  !in_array(Mage::app()->getResponse()->getHttpResponseCode(), array(200, 301, 404))) {
112
  return $this->setNoCacheHeader();
113
  }
107
  $this->setNoCacheCookie(true);
108
 
109
  // disable page caching for POSTs and no_cache parameters
110
+ if ($request->isPost() || $request->getParam('no_cache') || $request->getParam('___store') ||
111
  !in_array(Mage::app()->getResponse()->getHttpResponseCode(), array(200, 301, 404))) {
112
  return $this->setNoCacheHeader();
113
  }
app/code/community/Phoenix/VarnishCache/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Phoenix_VarnishCache>
25
- <version>4.0.3</version>
26
  </Phoenix_VarnishCache>
27
  </modules>
28
  <global>
22
  <config>
23
  <modules>
24
  <Phoenix_VarnishCache>
25
+ <version>4.0.5</version>
26
  </Phoenix_VarnishCache>
27
  </modules>
28
  <global>
app/design/frontend/base/default/template/varnishcache/cookie/environment.phtml CHANGED
@@ -27,16 +27,16 @@
27
  ?>
28
  <?php $_cookieName = $this->getCookieName(); ?>
29
  <script type="text/javascript">
30
- //<![CDATA[
31
  Mage.Cookies.set(
32
  '<?php echo $_cookieName ?>',
33
  <?php if ($_envHash = $this->getEnvironmentHash()): ?>
34
  '<?php echo $_envHash ?>',
35
- new Date(new Date().getTime() + <?php echo Mage::helper('core/cookie')->getCookieRestrictionLifetime() ?> * 1000)
36
  <?php else: ?>
37
- '',
38
  new Date(1970, 1, 1, 0, 0, 0)
39
  <?php endif;?>
40
  );
41
- //]]>
42
  </script>
27
  ?>
28
  <?php $_cookieName = $this->getCookieName(); ?>
29
  <script type="text/javascript">
30
+ //<![CDATA[
31
  Mage.Cookies.set(
32
  '<?php echo $_cookieName ?>',
33
  <?php if ($_envHash = $this->getEnvironmentHash()): ?>
34
  '<?php echo $_envHash ?>',
35
+ new Date(new Date().getTime() + <?php echo Mage::getModel('core/cookie')->getLifetime() ?> * 1000)
36
  <?php else: ?>
37
+ '',
38
  new Date(1970, 1, 1, 0, 0, 0)
39
  <?php endif;?>
40
  );
41
+ //]]>
42
  </script>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Varnish_Cache</name>
4
- <version>4.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -14,12 +14,12 @@
14
  &lt;p&gt;&#xA0;&lt;/p&gt;
15
  &lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
16
  &lt;p&gt;- Allows &lt;strong&gt;full page caching&lt;/strong&gt; of Magento store frontends with &lt;a href="http://www.varnish-cache.org" target="_blank"&gt;Varnish&lt;/a&gt;&lt;br /&gt;- Prevent caching of pages containing custom information (shopping carts, logins)&lt;br /&gt;- Configure request paths (controller, action) to be excluded from caching&lt;br /&gt;- Clean caches for single store views or content types&lt;br /&gt;- Maintain several Varnish instances&#xA0;from the Magento backend&lt;br /&gt;- Set TTL for content pages per store view&lt;br /&gt;- Deactivate Varnish cache for single store views or websites&lt;br /&gt;- Easily deactivate caching for certain Magento modules&lt;br /&gt;- Enable debug mode to analyse any issues&lt;br /&gt;&lt;strong&gt;- Ready to go Varnish configuration file (VCL)&lt;/strong&gt;&lt;/p&gt;</description>
17
- <notes>- fixed caching issues in multi-store environments
18
- - fixed Magento EE FPC caching issue</notes>
19
  <authors><author><name>PHOENIX MEDIA</name><user>auto-converted</user><email>info@phoenix-media.eu</email></author></authors>
20
- <date>2013-06-21</date>
21
- <time>09:25:56</time>
22
- <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="varnishcache.xml" hash="2454a4ad3e9bede38bb1b2ccff46fd95"/></dir><dir name="template"><dir name="varnishcache"><dir name="cache"><file name="additional.phtml" hash="486f1e32ff3f020200d91bcb81c20cad"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="varnishcache.xml" hash="ebb2baa59f12763907785379f5f47c47"/></dir><dir name="template"><dir name="varnishcache"><dir name="cookie"><file name="environment.phtml" hash="7393e5794faa7e4de3e788ad05d5a18f"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Phoenix_VarnishCache.csv" hash="fcd310b9d66d55abe92df78272edefb6"/></dir><dir name="en_US"><file name="Phoenix_VarnishCache.csv" hash="8fcaa3e009cf8ccec3e92b374a78a736"/></dir><dir name="es_ES"><file name="Phoenix_VarnishCache.csv" hash="eeaf2afe930687a4e5cdca5ffa02eb5b"/></dir><dir name="fr_FR"><file name="Phoenix_VarnishCache.csv" hash="f1926328dbd4bae4c23e585b7afb8309"/></dir><dir name="nb_NO"><file name="Phoenix_VarnishCache.csv" hash="077ab381e4eb8a50e638743a8fcf4fe6"/></dir></target><target name="mageetc"><dir name="modules"><file name="Phoenix_VarnishCache.xml" hash="09b2744bddf997a78cfb624ce6be20aa"/></dir><dir name="."><file name="varnishcache.xml" hash="8fdb975ad8c93e472486f3867a056b18"/></dir></target><target name="magecommunity"><dir name="Phoenix"><dir name="VarnishCache"><dir name="Block"><dir name="Adminhtml"><dir name="Cache"><file name="Additional.php" hash="44a8dc640984917ae31e5a2d450e8fba"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="RouteTTL.php" hash="de6271e60800ac70c9089c74b434a059"/><file name="Versioninfo.php" hash="add2ed546fad4a0f5617ea97165e73c0"/></dir></dir></dir></dir><dir name="Cookie"><file name="Environment.php" hash="24a57c76e6a69360faa3ade070df27a2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="VarnishCacheController.php" hash="32381c357ce32712c5efed8daf230c50"/></dir></dir><dir name="etc"><file name="config.xml" hash="985a259a7e687113d81118ef21f2f2cc"/><file name="default_3.0.vcl" hash="73c9b78464ea4bd64510d1d990f6d198"/><file name="system.xml" hash="78061a0fa7bee61a2e07f9253c79d6d6"/></dir><dir name="Helper"><dir name="Control"><dir name="Catalog"><file name="Category.php" hash="e58a8770c92b0ea2e2ff5bd892d334c2"/><file name="Product.php" hash="9de4d4b30c42fba3d9f9c08be3a538e2"/></dir><dir name="Cms"><file name="Page.php" hash="2cffdefd0c885c7e7c5e194b3e961c93"/></dir></dir><file name="Cache.php" hash="ed00f71bdceadaa22078d87e0b35d487"/><file name="Data.php" hash="949ba1821c33dea347b4dcc922b55a80"/></dir><dir name="Model"><dir name="Catalog"><dir name="Category"><file name="Product.php" hash="76fc154142e1c3aa59048107decf623e"/></dir><dir name="Product"><file name="Relation.php" hash="ad3a5929041ee76f3580aedf2b971356"/></dir></dir><dir name="Cms"><dir name="Page"><file name="Store.php" hash="1c7ab8d36e106d5e05d8042eaba7edc9"/></dir></dir><dir name="Control"><dir name="Catalog"><file name="Category.php" hash="b8a0d4e2256dae6c058cb830fe10e868"/><file name="Product.php" hash="18bb7d8df378051dab6b049bf9efedfe"/></dir><dir name="Cms"><file name="Page.php" hash="ad8480b584c64242b6311a3e35c23e5d"/></dir><file name="Abstract.php" hash="8d09e21ac95b81ac7a6575b23bd73a29"/></dir><dir name="Resource"><dir name="Mysql4"><dir name="Catalog"><dir name="Category"><dir name="Product"><file name="Collection.php" hash="75d70fef15bfde606fde7c1bbc7841d3"/></dir><file name="Product.php" hash="f429e2db437f16a679de9dbd9da28b30"/></dir><dir name="Product"><dir name="Relation"><file name="Collection.php" hash="c08fdc136ef5e2c4ef10361cf98067a5"/></dir></dir></dir><dir name="Cms"><dir name="Page"><dir name="Store"><file name="Collection.php" hash="a63387a48e2f96fbfb9b4b7a157b85d1"/></dir><file name="Store.php" hash="bb7f0738ded20199b1994ede2499fe8b"/></dir></dir><dir name="Core"><dir name="Url"><dir name="Rewrite"><file name="Collection.php" hash="e808bb4ff25ace9a4e6b3c4fa11c2888"/></dir></dir></dir></dir></dir><file name="Control.php" hash="10dc0c4d6153902c0bf42c826ae41187"/><file name="Observer.php" hash="e73759880ccbc80ccb15d64957c49084"/><file name="Processor.php" hash="d246663026bc67d74a262ab5f9a50cc3"/></dir><dir name="sql"><dir name="varnishcache_setup"><file name="install-4.0.0.php" hash="c39a62488663a0dc26f85542b9188a9d"/></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="README_VARNISH_CACHE.txt" hash="db28d47e56d3ec9554cd864becb481a1"/></dir></target></contents>
23
  <compatible/>
24
  <dependencies/>
25
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Varnish_Cache</name>
4
+ <version>4.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
14
  &lt;p&gt;&#xA0;&lt;/p&gt;
15
  &lt;p&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;
16
  &lt;p&gt;- Allows &lt;strong&gt;full page caching&lt;/strong&gt; of Magento store frontends with &lt;a href="http://www.varnish-cache.org" target="_blank"&gt;Varnish&lt;/a&gt;&lt;br /&gt;- Prevent caching of pages containing custom information (shopping carts, logins)&lt;br /&gt;- Configure request paths (controller, action) to be excluded from caching&lt;br /&gt;- Clean caches for single store views or content types&lt;br /&gt;- Maintain several Varnish instances&#xA0;from the Magento backend&lt;br /&gt;- Set TTL for content pages per store view&lt;br /&gt;- Deactivate Varnish cache for single store views or websites&lt;br /&gt;- Easily deactivate caching for certain Magento modules&lt;br /&gt;- Enable debug mode to analyse any issues&lt;br /&gt;&lt;strong&gt;- Ready to go Varnish configuration file (VCL)&lt;/strong&gt;&lt;/p&gt;</description>
17
+ <notes>- fixed issue with caching of store switching requests
18
+ - fixed compatibility issue with older magento versions</notes>
19
  <authors><author><name>PHOENIX MEDIA</name><user>auto-converted</user><email>info@phoenix-media.eu</email></author></authors>
20
+ <date>2013-07-05</date>
21
+ <time>15:13:12</time>
22
+ <contents><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="varnishcache.xml" hash="2454a4ad3e9bede38bb1b2ccff46fd95"/></dir><dir name="template"><dir name="varnishcache"><dir name="cache"><file name="additional.phtml" hash="486f1e32ff3f020200d91bcb81c20cad"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="varnishcache.xml" hash="ebb2baa59f12763907785379f5f47c47"/></dir><dir name="template"><dir name="varnishcache"><dir name="cookie"><file name="environment.phtml" hash="762076bac2e7d1c45c5bb56f541b1475"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Phoenix_VarnishCache.csv" hash="fcd310b9d66d55abe92df78272edefb6"/></dir><dir name="en_US"><file name="Phoenix_VarnishCache.csv" hash="8fcaa3e009cf8ccec3e92b374a78a736"/></dir><dir name="es_ES"><file name="Phoenix_VarnishCache.csv" hash="eeaf2afe930687a4e5cdca5ffa02eb5b"/></dir><dir name="fr_FR"><file name="Phoenix_VarnishCache.csv" hash="f1926328dbd4bae4c23e585b7afb8309"/></dir><dir name="nb_NO"><file name="Phoenix_VarnishCache.csv" hash="077ab381e4eb8a50e638743a8fcf4fe6"/></dir></target><target name="mageetc"><dir name="modules"><file name="Phoenix_VarnishCache.xml" hash="09b2744bddf997a78cfb624ce6be20aa"/></dir><dir name="."><file name="varnishcache.xml" hash="8fdb975ad8c93e472486f3867a056b18"/></dir></target><target name="magecommunity"><dir name="Phoenix"><dir name="VarnishCache"><dir name="Block"><dir name="Adminhtml"><dir name="Cache"><file name="Additional.php" hash="44a8dc640984917ae31e5a2d450e8fba"/></dir><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="RouteTTL.php" hash="de6271e60800ac70c9089c74b434a059"/><file name="Versioninfo.php" hash="add2ed546fad4a0f5617ea97165e73c0"/></dir></dir></dir></dir><dir name="Cookie"><file name="Environment.php" hash="24a57c76e6a69360faa3ade070df27a2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="VarnishCacheController.php" hash="32381c357ce32712c5efed8daf230c50"/></dir></dir><dir name="etc"><file name="config.xml" hash="5817860430d7bc0c59f67eae4490cbf8"/><file name="default_3.0.vcl" hash="73c9b78464ea4bd64510d1d990f6d198"/><file name="system.xml" hash="78061a0fa7bee61a2e07f9253c79d6d6"/></dir><dir name="Helper"><dir name="Control"><dir name="Catalog"><file name="Category.php" hash="e58a8770c92b0ea2e2ff5bd892d334c2"/><file name="Product.php" hash="9de4d4b30c42fba3d9f9c08be3a538e2"/></dir><dir name="Cms"><file name="Page.php" hash="2cffdefd0c885c7e7c5e194b3e961c93"/></dir></dir><file name="Cache.php" hash="c21b40120225c4109c4c3c63f6dd9f0e"/><file name="Data.php" hash="949ba1821c33dea347b4dcc922b55a80"/></dir><dir name="Model"><dir name="Catalog"><dir name="Category"><file name="Product.php" hash="76fc154142e1c3aa59048107decf623e"/></dir><dir name="Product"><file name="Relation.php" hash="ad3a5929041ee76f3580aedf2b971356"/></dir></dir><dir name="Cms"><dir name="Page"><file name="Store.php" hash="1c7ab8d36e106d5e05d8042eaba7edc9"/></dir></dir><dir name="Control"><dir name="Catalog"><file name="Category.php" hash="b8a0d4e2256dae6c058cb830fe10e868"/><file name="Product.php" hash="18bb7d8df378051dab6b049bf9efedfe"/></dir><dir name="Cms"><file name="Page.php" hash="ad8480b584c64242b6311a3e35c23e5d"/></dir><file name="Abstract.php" hash="8d09e21ac95b81ac7a6575b23bd73a29"/></dir><dir name="Resource"><dir name="Mysql4"><dir name="Catalog"><dir name="Category"><dir name="Product"><file name="Collection.php" hash="75d70fef15bfde606fde7c1bbc7841d3"/></dir><file name="Product.php" hash="f429e2db437f16a679de9dbd9da28b30"/></dir><dir name="Product"><dir name="Relation"><file name="Collection.php" hash="c08fdc136ef5e2c4ef10361cf98067a5"/></dir></dir></dir><dir name="Cms"><dir name="Page"><dir name="Store"><file name="Collection.php" hash="a63387a48e2f96fbfb9b4b7a157b85d1"/></dir><file name="Store.php" hash="bb7f0738ded20199b1994ede2499fe8b"/></dir></dir><dir name="Core"><dir name="Url"><dir name="Rewrite"><file name="Collection.php" hash="e808bb4ff25ace9a4e6b3c4fa11c2888"/></dir></dir></dir></dir></dir><file name="Control.php" hash="10dc0c4d6153902c0bf42c826ae41187"/><file name="Observer.php" hash="e73759880ccbc80ccb15d64957c49084"/><file name="Processor.php" hash="d246663026bc67d74a262ab5f9a50cc3"/></dir><dir name="sql"><dir name="varnishcache_setup"><file name="install-4.0.0.php" hash="c39a62488663a0dc26f85542b9188a9d"/></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="README_VARNISH_CACHE.txt" hash="046ffff8efb2f1626fbfaeb16b146c61"/></dir></target></contents>
23
  <compatible/>
24
  <dependencies/>
25
  </package>