Hot answers tagged

6

Magento uses ESI to isolate navigation block from other content. The main effect of ESI is separate TTL for part of the page. However, Magento uses the isolation effect of ESI in order to minimize the count of pages which need to be invalidated during updates in category entity. The navigation block is present on every page in Magento, this means that any ...


5

At present I see the expires is set to -1 The Expires header you see is client-side. Browsers should not cache things like product pages, etc. which is why the default Magento VCL sets it to -1 in vcl_deliver procedure. The vcl_deliver is what you use in Varnish for controlling the output to the clients (e.g. browsers). How long Varnish will cache things ...


4

You can Enable the Sign static files option in system configuration and redeploy static files : Store=>Configuration=>Advanced=>Developer=>Static file signing settings to yes Make sure that you have correctly set up your webserver. You can based on the nginx sample configuration or on the htaccess. Make sure you have this kind of lines : ...


3

There can be different reasons for this issue. The best way to figure out the issue is "check your webserver log" which will be "/var/logs/[apache or nginx]/[the log file name configured in virtual host]". In this case, the error message is: FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to undefined function apc_clear_cache() in /path/app/...


2

In Lesti_FPC's system.xml file change the "0" to "1" in below section to activate it. <customer_groups> <label>Customer Group Caching</label> <frontend_type>select</frontend_type> <source_model>adminhtml/system_config_source_yesno</source_model> <sort_order>70</sort_order&...


2

You can't disable single block cache like in magento 1, Magento recommends handling customer related data via ajax. So you need to create an api endpoint or section data and use javascript to retrieve the data and load it on front :) https://amasty.com/blog/how-to-use-sections-in-magento-2/


2

Magento 1.9 doesn't have such a rigerous caching mechanism by default as Magento 2 does, so you should be able to load the new JS file by just clearing the cache from the backend or by disabling it completely. But if this is not casued by Magento's internal cache or the browser cache, then it might be a reverse proxy cache like Varnish or Apache's mod_cache ...


2

First of all, avoiding using Object Manager directly in our template. This is not good for best practice. Should create a new block and try to apply the solutions below: Solutions for Caching issue Using after.body.start or before_body_end [Seem that these blocks are cached] These blocks are not cached. So, we can add your custom block to these containers. ...


1

You can use the below code to achieve it using XML. <block class="Magento\Framework\View\Element\Template" name="test_view" template="Magento_Theme::html/test.phtml"/> To make the page non-cacheable you can use cacheable attribute. <block class="Magento\Framework\View\Element\Template" name="test_view" template="Magento_Theme::html/test.phtml" ...


1

Even with all caches disabled, Magento will still cache locale & PDO connections which is a by-product of Zend framework which you can see in lib/. However there should be no blocks/html/etc. being cached. 1) Double check your app/etc/local.xml and review the Cache mechanisms configured. If default, all should be file based under MagentoRoot/var ...


1

My bet is Magento is not guilty here Static files are cached by default by most modern browsers (you should play with configuration of the browser you use & see if you can disable that feature, or you can try browsing in incognito mode... although I am not sure that would download all static resources every page load, as you require) Another possible ...


1

You need to setup following step in your controller. 1. Define constructor – pass Magento\Framework\App\Cache\TypeListInterface and Magento\Framework\App\Cache\Frontend\Pool to your file’s constructor as defined below : public function __construct( Context $context, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList, \Magento\...


1

The customer specific data(private data) is not a part of the public content, so there is no need to disable caching using cacheable attribute. Regarding the issue, the proper section of documentation is http://devdocs.magento.com/guides/v2.2/extension-dev-guide/cache/page-caching/private-content.html The private data is stored in browser local storage. ...


1

Enable Sign static files option in system configuration and redeploy static files.


1

Flush Magento Cache This button deals with the main cache items for page display purposes. It can safely be used if you want to refresh your page. "Flush Magento Cache" removes only those entries that Magento reliably tracks as it's own. Removes all items in the default Magento cache (var/cache) and the var/full_page cache that have a ...


1

It seems flat catalog is enabled in your website: Inside System->Index Management->Product Prices ->Reindex Data also set mode as Update on save


1

It sounds like cache invalidation isn't happening. There are some additional notes to consider from Colin about the module Cm_Redis used in default installations as well that offer more insight. Particularly the garbage collection nightly. You may also look over the issues of the module to see if any others have reported similar issues. https://github.com/...


1

If you need only product price block to be rendered you can use like this: $out=Mage::getBlockSingleton('catalog/product_view')->getPriceHtml($_product); See getPriceHtml() method of Mage_Catalog_Block_Product_Abstract which is parent class of Mage_Catalog_Block_Product_View Second Way Extend your block customerprices/catalog_product_view from ...


Only top voted, non community-wiki answers of a minimum length are eligible