File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function handleControllerFrontSendResponseBefore(Varien_Event_Observer $o
25
25
$ params = $ paramProvider ->baseParams (true ) + array (
26
26
'type ' => $ type ,
27
27
'route ' => $ this ->trackerRoute (),
28
+ 'cacheable ' => $ this ->isRequestCacheable ()
28
29
);
29
30
30
31
$ factory = Mage::getModel ('mpchadwick_pagecachehitrate/trackerFactory ' );
@@ -40,6 +41,20 @@ public function handleControllerFrontSendResponseBefore(Varien_Event_Observer $o
40
41
}
41
42
}
42
43
44
+ /**
45
+ * Determine this request is cacheable in FPC
46
+ *
47
+ * @return bool
48
+ */
49
+ protected function isRequestCacheable ()
50
+ {
51
+ $ request = Mage::app ()->getRequest ();
52
+ $ processor = Mage::getSingleton ('enterprise_pagecache/processor ' );
53
+ $ subprocessor = $ processor ->getMetadata ('cache_subprocessor ' );
54
+
55
+ return $ subprocessor !== null && $ processor ->canProcessRequest ($ request );
56
+ }
57
+
43
58
/**
44
59
* Get the type of response.
45
60
*
You can’t perform that action at this time.
0 commit comments