This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Packagename_Modulename_Model_Observer | |
{ | |
public function enableCmsBlockCaching($observer) | |
{ | |
$block = $observer->getBlock(); | |
if ($block instanceof Mage_Cms_Block_Widget_Block | |
|| $block instanceof Mage_Cms_Block_Block | |
) { | |
$cacheKeyData = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<placeholders> | |
<cmsblock_tag> | |
<block>cms/block</block> | |
<placeholder>HTML_CMS_CACHED_ID</placeholder> | |
<container>Packagename_Modulename_Model_Punchhole</container> | |
<cache_lifetime>86400</cache_lifetime> | |
</cmsblock_tag> | |
<widget_tag> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Packagename_Modulename_Block_Block extends Mage_Cms_Block_Block | |
{ | |
public function getCacheKeyInfo() { | |
return array('block_id' => $this->getBlockId()); | |
} | |
} | |
?> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Packagename_Modulename_Model_Punchhole extends Enterprise_PageCache_Model_Container_Abstract | |
{ | |
protected function _getIdentifier() | |
{ | |
return $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CUSTOMER, ''); | |
} | |
/** | |
* Get cache identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Packagename_Modulename_Model_Punchhole2 extends Enterprise_PageCache_Model_Container_Abstract | |
{ | |
protected function _getIdentifier() | |
{ | |
return $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CUSTOMER, ''); | |
} | |
/** | |
* Get cache identifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<core_block_abstract_to_html_before> | |
<observers> | |
<cms_checker> | |
<type>Singleton</type> | |
<method>enableCmsBlockCaching</method> | |
<class>Packagename_Modulename_Model_Observer</class> | |
</cms_checker> | |
</observers> | |
</core_block_abstract_to_html_before> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<field name="film_title" type="text_general" indexed="true" stored="true" /> | |
<field name="film_description" type="text_general" indexed="true" stored="true" /> | |
<field name="film_category" type="text_general" indexed="true" stored="true" /> | |
<field name="film_length" type="text_general" indexed="true" stored="true" /> | |
<field name="film_rating" type="text_general" indexed="true" stored="true" /> | |
<field name="film_actors" type="text_general" indexed="true" stored="true" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<uniqueKey>id</uniqueKey> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<requestHandler name="/select" class="solr.SearchHandler"> | |
<!-- default values for query parameters can be specified, these | |
will be overridden by parameters in the request | |
--> | |
<lst name="defaults"> | |
<str name="echoParams">explicit</str> | |
<int name="rows">10</int> | |
<str name="df">text</str> | |
<str name="defType">edismax</str> | |
<str name="fl">*</str> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use UnitedPrototype\GoogleAnalytics; | |
// initiate the tracker | |
$tracker = new GoogleAnalytics\Tracker($accountId, $account_domain); | |
// Assemble Visitor information | |
// (could also get unserialized from database) | |
$visitor = new GoogleAnalytics\Visitor(); | |
$visitor->setIpAddress($_SERVER['REMOTE_ADDR']); |
OlderNewer