Skip to content

Commit

Permalink
- Reduce default cache constant that was removed in magento#9841 (rem…
Browse files Browse the repository at this point in the history
…oved as currency wasn't included in cache key, now is added via this plugin https://github.com/VortexCommerce/magento2/blob/23d76ed074d7d5e465cbed782a2831abe192de96/app/code/Magento/Catalog/Block/Category/Plugin/PriceBoxTags.php#L68)

- Increase default cache time to 1 day (86400) this is more that acceptable as the cache key includes the current date so will not load for a new day which could have a new price rule, special price etc...
  • Loading branch information
Bruce Mead committed Dec 20, 2018
1 parent 4ee3bb3 commit b2e58d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/Magento/Framework/Pricing/Render/PriceBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
class PriceBox extends Template implements PriceBoxRenderInterface, IdentityInterface
{
/** Default block lifetime */
const DEFAULT_LIFETIME = 3600;
const DEFAULT_LIFETIME = 86400;

/**
* @var SaleableInterface
Expand Down Expand Up @@ -86,7 +86,7 @@ public function getCacheKey()
*/
protected function getCacheLifetime()
{
return parent::hasCacheLifetime() ? parent::getCacheLifetime() : null;
return parent::hasCacheLifetime() ? parent::getCacheLifetime() : self::DEFAULT_LIFETIME;
}

/**
Expand Down

0 comments on commit b2e58d5

Please sign in to comment.