Permalink
Browse files

removing left svndirs

  • Loading branch information...
1 parent 473ed09 commit 1143128f53ed28e77b91c9103ee94cd8ff51ef20 @StephanHoyer StephanHoyer committed Nov 10, 2009
View
104 app/code/community/Netresearch/CatalogCache/Block/Product/.svn/entries
@@ -1,104 +0,0 @@
-10
-
-dir
-4
-svn://svn.nr/starterpaket.magento.nr/trunk/app/code/community/Netresearch/CatalogCache/Block/Product
-svn://svn.nr/starterpaket.magento.nr
-
-
-
-2009-09-11T09:20:57.105337Z
-4
-stephan.hoyer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-56bfe515-046e-4b9f-b12b-6d058fc023cc
-
-
-
-
-
-
-
-empty
-
-View.php
-file
-8
-
-
-
-2009-09-23T12:36:17.000000Z
-906c1979eaf7ee918882544af1bcdacb
-2009-09-23T14:04:04.778579Z
-8
-stephan.hoyer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3019
-
-List.php
-file
-16
-
-
-
-2009-09-24T09:05:59.000000Z
-79c33adb768b21faabd169b5f03baba6
-2009-09-25T12:06:33.304078Z
-16
-stephan.hoyer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-3725
-
View
124 app/code/community/Netresearch/CatalogCache/Block/Product/.svn/text-base/List.php.svn-base
@@ -1,124 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Catalog
- * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-
-/**
- * Rewrite of Product list to enable caching
- *
- * @category Netresearch
- * @package Netresearch_CatalogCache
- * @author Netresearch <info@netresearch.de>
- */
-class Netresearch_CatalogCache_Block_Product_List extends Mage_Catalog_Block_Product_List
-{
- protected function _isCacheActive()
- {
- if(!Mage::getStoreConfig('catalog/frontend/cache_list')) {
- return false;
- }
-
- /* if there are any messages dont read from cache to show them */
- if(Mage::getSingleton('core/session')->getMessages(true)->count() > 0) {
- return false;
- }
- return true;
-
- }
-
- public function getCacheLifetime()
- {
- if($this->_isCacheActive())
- {
- return false;
- }
- }
-
- protected function _loadCache()
- {
-
- $cache = parent::_loadCache();
- Mage::debug($cache === false ? "computed" : "from cache");
- return $cache;
- }
-
- public function getCacheKey()
- {
- if(!$this->_isCacheActive()) {
- parent::getCacheKey();
- }
- $_taxRateRequest = Mage::getModel('tax/calculation')->getRateRequest();
- $_customer = Mage::getSingleton('customer/session')->getCustomer();
- $this->_category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
- $_page = $this->getPage();
-
- $toolbar = new Mage_Catalog_Block_Product_List_Toolbar();
- $return = 'ProductView_'.
- /* Create differnet caches for differnt...
- * ... categories */
- $this->_category->getId().'_'.
- /* ... orders */
- $toolbar->getCurrentOrder().'_'.
- /* ... direction */
- $toolbar->getCurrentDirection().'_'.
- /* ... mode */
- $toolbar->getCurrentMode().'_'.
- /* ... page */
- $toolbar->getCurrentPage().'_'.
- /* ... items per page */
- $toolbar->getLimit().'_'.
- /* ... stores */
- Mage::App()->getStore()->getCode().'_'.
- /* ... customer groups */
- $_customer->getGroupId().'_'.
- $_taxRateRequest->getCountryId()."_".$_taxRateRequest->getRegionId()."_".$_taxRateRequest->getPostcode()."_".$_taxRateRequest->getCustomerClassId()."_".
- /* ... tags */
- Mage::registry('current_tag').'_'.
- '';
- /* ... layern navigation + search */
- foreach(Mage::app()->getRequest()->getParams() as $key=>$value) {
- $return .= $key.'-'.$value.'_';
- }
- return $return;
- }
-
-
- public function getCacheTags()
- {
- if(!$this->_isCacheActive()) {
- return parent::getCacheTags();
- }
- $cacheTags = array(
- Mage_Catalog_Model_Category::CACHE_TAG,
- Mage_Catalog_Model_Category::CACHE_TAG.'_'.$this->_category->getId()
- );
- foreach($this->_getProductCollection() as $_product) {
- $cacheTags[] = Mage_Catalog_Model_Product::CACHE_TAG."_".$_product->getId();
- }
- return $cacheTags;
-
- }
-}
-
View
108 app/code/community/Netresearch/CatalogCache/Block/Product/.svn/text-base/View.php.svn-base
@@ -1,108 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Catalog
- * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-
-/**
- * Rewrite of Product view to enable caching
- *
- * @category Netresearch
- * @package Netresearch_CatalogCache
- * @author Netresearch <info@netresearch.de>
- */
-class Netresearch_CatalogCache_Block_Product_View extends Mage_Catalog_Block_Product_View
-/**
- * replace this parent class by your inhereted version of th Product_View Block
- * e.g. class Netresearch_CatalogCache_Block_Product extends MyNameSpace_MyModule_Catalog_Block_Product_View
- */
-{
- protected function _isCacheActive()
- {
- if(!Mage::getStoreConfig('catalog/frontend/cache_view')) {
- return false;
- }
-
- /* if there are any messages dont read from cache to show them */
- if(Mage::getSingleton('core/session')->getMessages(true)->count() > 0) {
- return false;
- }
-
- return true;
- }
-
- public function getCacheLifetime()
- {
- if($this->_isCacheActive())
- {
- return false;
- }
- }
-
- protected function _loadCache()
- {
- $cache = parent::_loadCache();
- Mage::debug($cache===false? "computed":"from cache");
- return $cache;
- }
-
- public function getCacheKey()
- {
- if(!$this->_isCacheActive()) {
- parent::getCacheKey();
- }
- $_taxCalculator = Mage::getModel('tax/calculation');
- $_customer = Mage::getSingleton('customer/session')->getCustomer();
- $_product = $this->getProduct();
- return 'ProductView'.
- /* Create differnet caches for ...
- * ... for different products */
- $_product->getId().'_'.
- /* ... for different stores */
- Mage::App()->getStore()->getCode().'_'.
- /* ... for different customer groups */
- $_customer->getGroupId().'_'.
- /* ... for different tax classes (related to customer and product) */
- $_taxCalculator->getRate(
- $_taxCalculator
- ->getRateRequest()
- ->setProductClassId($_product->getTaxClassId()
- )
- ).'_'.
- '';
- }
-
-
- public function getCacheTags()
- {
- if(!$this->_isCacheActive()) {
- return parent::getCacheTags();
- }
- return array(
- Mage_Catalog_Model_Product::CACHE_TAG,
- Mage_Catalog_Model_Product::CACHE_TAG."_".$this->getProduct()->getId()
- );
-
- }
-}

0 comments on commit 1143128

Please sign in to comment.