Made_Cache - Version 1.1.1

Version Notes

N/A

Download this release

Release Info

Developer Jonathan Selander
Extension Made_Cache
Version 1.1.1
Comparing to
See all releases


Code changes from version 1.1.0 to 1.1.1

app/code/community/Made/Cache/Model/Layout.php CHANGED
@@ -150,9 +150,6 @@ class Made_Cache_Model_Layout extends Mage_Core_Model_Layout
150
  if (in_array($blockName, array_keys($this->_cacheBlocks))) {
151
  $block->setData('cache_lifetime', $this->_cacheBlocks[$blockName]);
152
  $block->setData('cache_key', $this->_getCacheKey($node));
153
- if (!empty($node['cache_tags'])) {
154
- $block->setData('cache_tags', (string)$node['cache_tags']);
155
- }
156
  }
157
 
158
  if (in_array($blockName, array_keys($this->_esiBlocks))) {
150
  if (in_array($blockName, array_keys($this->_cacheBlocks))) {
151
  $block->setData('cache_lifetime', $this->_cacheBlocks[$blockName]);
152
  $block->setData('cache_key', $this->_getCacheKey($node));
 
 
 
153
  }
154
 
155
  if (in_array($blockName, array_keys($this->_esiBlocks))) {
app/code/community/Made/Cache/Model/Observer.php CHANGED
@@ -72,6 +72,12 @@ class Made_Cache_Model_Observer
72
  public function addEsiTag(Varien_Event_Observer $observer)
73
  {
74
  $block = $observer->getEvent()->getBlock();
 
 
 
 
 
 
75
  if ($block->getData('esi')) {
76
  $layoutHandles = $block->getLayout()->getUpdate()
77
  ->getHandles();
72
  public function addEsiTag(Varien_Event_Observer $observer)
73
  {
74
  $block = $observer->getEvent()->getBlock();
75
+
76
+ // Only return an ESI tag if varnish is in front
77
+ if (!$block->getRequest()->getHeader('X-Varnish')) {
78
+ return;
79
+ }
80
+
81
  if ($block->getData('esi')) {
82
  $layoutHandles = $block->getLayout()->getUpdate()
83
  ->getHandles();
app/code/community/Made/Cache/etc/config.xml CHANGED
@@ -9,7 +9,7 @@
9
  <config>
10
  <modules>
11
  <Made_Cache>
12
- <version>1.1.0</version>
13
  </Made_Cache>
14
  </modules>
15
  <global>
9
  <config>
10
  <modules>
11
  <Made_Cache>
12
+ <version>1.1.1</version>
13
  </Made_Cache>
14
  </modules>
15
  <global>
app/design/frontend/base/default/layout/madecache.xml CHANGED
@@ -16,7 +16,6 @@
16
  <name lifetime="86400">left</name>
17
  <name>head</name>
18
  <name>breadcrumbs</name>
19
- <name>after_body_start</name>
20
  <name>before_body_end</name>
21
  <name>product.info</name>
22
  <name>product_list</name>
@@ -24,12 +23,18 @@
24
  <name lifetime="7200">cart_sidebar</name>
25
  </cache>
26
 
27
- <!-- Example of rendering the cart using ESI -->
28
  <!--
 
 
 
29
  <esi>
30
  <name>cart_sidebar</name>
 
 
 
 
 
31
  </esi>
32
- -->
33
  </default>
34
 
35
  <checkout_onepage_index>
16
  <name lifetime="86400">left</name>
17
  <name>head</name>
18
  <name>breadcrumbs</name>
 
19
  <name>before_body_end</name>
20
  <name>product.info</name>
21
  <name>product_list</name>
23
  <name lifetime="7200">cart_sidebar</name>
24
  </cache>
25
 
 
26
  <!--
27
+ Example of blocks that typically should render using ESI, this
28
+ is only used if Varnish is actually in front of Magento
29
+ -->
30
  <esi>
31
  <name>cart_sidebar</name>
32
+ <name>catalog.compare.sidebar</name>
33
+ <name>right.reports.product.viewed</name>
34
+ <name>right.reports.product.compared</name>
35
+ <name>left.reports.product.viewed</name>
36
+ <name>google_analytics</name>
37
  </esi>
 
38
  </default>
39
 
40
  <checkout_onepage_index>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Made_Cache</name>
4
- <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license>OSL 3.0</license>
7
  <channel>community</channel>
@@ -18,9 +18,9 @@ ESI is supported in conjunction with Phoenix_VarnishCache, and allows for super-
18
  A good block cache is vital for scaling a site, be sure to implement it before residing to full page cache.</description>
19
  <notes>N/A</notes>
20
  <authors><author><name>Jonathan Selander</name><user>jonathan_made</user><email>info@madepeople.se</email></author></authors>
21
- <date>2012-05-23</date>
22
- <time>13:26:54</time>
23
- <contents><target name="magecommunity"><dir name="Made"><dir name="Cache"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="List"><file name="Product.php" hash="6356fde9c5acf5f0a96851e780a691b1"/></dir><file name="List.php" hash="06ab53286ff19e5cf057b6f3da90088f"/></dir></dir></dir><dir name="Model"><file name="Layout.php" hash="f3bf85d778680fb1246416ad5b63e961"/><dir name="Observer"><file name="Abstract.php" hash="e8e501179fdbca2596b4d8b5291ec95c"/><file name="Catalog.php" hash="c58a254f967aba975cb8351e0ce5eb90"/><file name="Checkout.php" hash="4c1361159d91da2452c1d50e1fc52505"/><file name="Cms.php" hash="dac87d4f7e6720136fc84ba3ac32ff7d"/></dir><file name="Observer.php" hash="72c108a3656b1e813bcb3dcb16f0b3de"/></dir><dir name="controllers"><file name="VarnishController.php" hash="6ae7446eef83e106c56b0f05711c3ffa"/></dir><dir name="etc"><file name="config.xml" hash="6eea279bba8f9e4c0c4bf3c44e6a5817"/><file name="magento.vcl" hash="dd4f36661f4da1563fb383aa23e872d1"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Made_Cache.xml" hash="4cf53cc9b4e525eb560f7fe1278d96bd"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="madecache.xml" hash="e7431217f4b0ddc25b405c26530f9161"/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Made_Cache</name>
4
+ <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license>OSL 3.0</license>
7
  <channel>community</channel>
18
  A good block cache is vital for scaling a site, be sure to implement it before residing to full page cache.</description>
19
  <notes>N/A</notes>
20
  <authors><author><name>Jonathan Selander</name><user>jonathan_made</user><email>info@madepeople.se</email></author></authors>
21
+ <date>2012-05-31</date>
22
+ <time>10:16:22</time>
23
+ <contents><target name="magecommunity"><dir name="Made"><dir name="Cache"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="List"><file name="Product.php" hash="6356fde9c5acf5f0a96851e780a691b1"/></dir><file name="List.php" hash="06ab53286ff19e5cf057b6f3da90088f"/></dir></dir></dir><dir name="Model"><file name="Layout.php" hash="a9de02e5a6bf7b7f91434998f5d53c40"/><dir name="Observer"><file name="Abstract.php" hash="e8e501179fdbca2596b4d8b5291ec95c"/><file name="Catalog.php" hash="c58a254f967aba975cb8351e0ce5eb90"/><file name="Checkout.php" hash="4c1361159d91da2452c1d50e1fc52505"/><file name="Cms.php" hash="dac87d4f7e6720136fc84ba3ac32ff7d"/></dir><file name="Observer.php" hash="ae71a2dd08b385bae7549ed235b2a528"/></dir><dir name="controllers"><file name="VarnishController.php" hash="6ae7446eef83e106c56b0f05711c3ffa"/></dir><dir name="etc"><file name="config.xml" hash="b6ce0c6ec98700058c2c49e9ea2563c9"/><file name="magento.vcl" hash="dd4f36661f4da1563fb383aa23e872d1"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Made_Cache.xml" hash="4cf53cc9b4e525eb560f7fe1278d96bd"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="madecache.xml" hash="a57137ded81a32c5a7fd21277964f45d"/></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>