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 ...
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 ...
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 :
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. ...
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/...
In Lesti_FPC's system.xml file change the "0" to "1" in below section to activate it.
<label>Customer Group Caching</label>
You can't disable single block cache like in magento 1,
Magento recommends handling customer related data via ajax.
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 ...
Please try the following code：
class Search extends \Magento\Framework\App\Action\Action
public function __construct(
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" ...
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 ...
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 ...
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(
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. ...
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 ...
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.
If you need only product price block to be rendered you can use like this:
See getPriceHtml() method of Mage_Catalog_Block_Product_Abstract which is parent class of Mage_Catalog_Block_Product_View
Extend your block customerprices/catalog_product_view from ...