Questions tagged [full-page-cache]

Full Page Cache from the PageCache Enterprise module. Tag might also be used for CE FPC solutions, within the scope of the site (see tag wiki)

Filter by
Sorted by
Tagged with
1 vote
1 answer
30 views

Forcing browser caching on custom controller / full page cache disables browser caching

I have a custom controller which should serve some more or less static HTML block, with this code: use Magento\Framework\App\Action\HttpGetActionInterface; use Magento\Framework\App\Response\...
Alex's user avatar
  • 13.8k
0 votes
1 answer
20 views

Best default page to use for Pingdom that isn't cached

We recently had a server outage that was not reported by Pingdom. The issue was the site was fully cached and Most pages responded. It wasn't until you got into Checkout that the error surfaced. Is ...
brentwpeterson's user avatar
0 votes
1 answer
41 views

FPC issue with same product in multiple categories

I have an issue I am trying to solve regarding caching. I have products that are in multiple categories and whichever one is visited first is the one that's cached. When navigating to the same product ...
Mukesh Prajapati's user avatar
1 vote
2 answers
102 views

Magento2: The env.php file keeps automatically changing

The file env.php is changing automatically and randomly. Environment: Cluster server Deployer Magento 2.4.6-p3 Redis, varnish and cloudflare php 8.1 Here is the actual the env.php 'session' => [...
Mohammed Alrefai's user avatar
1 vote
2 answers
120 views

Prevent phtml template from FPC/Varnish cache - Magento2.4

We created a custom phtml template with some customer specific php, that must be loaded for each customer/pageload again. So we created the phtml template and added the following code to layout/...
JGeer's user avatar
  • 1,416
0 votes
0 answers
60 views

Magento 2 prevent clearing cache on product save in Admin

When I edit product or products in admin, after save, Magento clear cache. Now, When I decide to change 1 product this is ok, but when I want to made changes on 100 product, this is quite annoying.... ...
Petka's user avatar
  • 1
0 votes
0 answers
44 views

Magento 2 - Purge Varnish Cache for specific CMS Block

I have correctly implemented the purges to varnish from Magento, but when I modify a product the changes are reflected when it is not inside a cms block, for example when I see them inside a category ...
Diego Castro's user avatar
0 votes
0 answers
41 views

Magento 2 / Clear cache from another server

We have the project on 2 servers. Is there a way to programmatically clear cache for both servers? I tried apply clear cache on 2 servers with this method but it does not work And change event with ...
Diego Castro's user avatar
0 votes
1 answer
28 views

Customizing product listings cache in Magento 2 based on cookie value for unlogged customers

I would like to customize the product listings cache for unlogged customers in Magento 2 so that the order of products is sorted based on a value stored in a cookie. Currently, Magento uses a single ...
Estern's user avatar
  • 1
1 vote
1 answer
82 views

Magento 2 - Error after setting Varnish host and port in purges when trying to save modifications to a product

I have configured the host and port to purge Varnish as it says in the official documentation: bin/magento setup:config:set --http-cache-hosts=varnish_host:varnish_port But when I try to save the ...
Diego Castro's user avatar
0 votes
0 answers
37 views

Magento2 Full Page Cache Automatically Invalidated

I have running magento243 version and it is working fine . But I am facing issue in cache flush. My admin cache is automatically cleared after every 30 minutes. I am using cron scheduler extension and ...
Sanjay Shiyal's user avatar
0 votes
1 answer
333 views

Error: Call to a member function getFieldValue() on bool in vendor/magento/framework/App/PageCache/Kernel.php:134

I was getting this error when sending response to the get type ajax controller. the code was like below. <?php declare(strict_types=1); namespace Vendor\Module\Controller\Index; use Magento\...
Dharmesh N Tukadiya's user avatar
0 votes
1 answer
115 views

Difference between bin/magento c:f and bin/magento c:c cache commands in Magento 2

I would like to understand the difference between the bin/magento c:f and bin/magento c:c commands used for cache management in Magento 2. Although they both serve the purpose of clearing the cache, I ...
user avatar
0 votes
1 answer
147 views

Display customer group ID on page with all caches enabled

What's the best way to display the current customer's group id on the page when all caches are enabled including full-page cache. I did think of potentially using JS and KO but it didn't look like the ...
Goose84's user avatar
  • 2,581
0 votes
0 answers
31 views

Magento 2: Blocks missing identities

When working with Full Page Cache and Varnish, the blocks are suppose to pass an array on the function afterGetOutput, by using the function $block->getIdentities(). These arrays are then merged ...
archigrafix's user avatar
0 votes
1 answer
68 views

Prevent XML file in media directory to be cached

We are generating a custom XML and stored in the media directory to be accessed by URL. La full URL of the XML have this structure: https://[maindomain.com]/media/googleshopping/googleshopping4-1.xml ...
Eliacim DAVILA - CENSERE's user avatar
0 votes
1 answer
34 views

We can't find products matching the selection - Cached (Varnish) M2.4.5

In rare cases we have category pages showing "We can't find products matching the selection" while actually the category contains products. This happens when the category is visited while ...
Anton-GrNL's user avatar
0 votes
1 answer
193 views

Varnish enabled or not?

Hi dears I installed varnish cache on centos 7 , nginx 1.20.1 and magento 2.4.5 -p1. After that I don't seeing any header about varnish on my browser. Another thing when I clear cache I have log in ...
Peren's user avatar
  • 27
1 vote
2 answers
340 views

Magento 2 increase Page Cache Storage Automatically

I have a problem with the cache on Magento 2.3.x According to my hosting provider services, the script of Magento 2.3.x is bigger and bigger size day by day. For example, last week the size of all ...
Talha Tariq's user avatar
1 vote
0 answers
671 views

Magento 2 - Serve cached content from Varnish while fetching a new object from the backend to deliver it on the next request

When I change any objects in the Magento backend, a PURGE request is sent to Varnish which results in a slow response time once a customer requests the changed product. The site is then loaded into ...
Permittivity's user avatar
1 vote
0 answers
173 views

Product Image not showing on listing page frontend after code migration Magento 2.4.3

I moved my project to a different directory as the memory is low in the disk, everything is working fine except the product listing page where the images are missing. Showing default image. Wrong ...
fernandus's user avatar
  • 484
1 vote
0 answers
225 views

Magento 2.4 Plugin afterGetPrice() - issues with Full Page Cache

I am overriding the frontend price by using the Magento\Catalog\Model\Product plugin like so: Sulman/Mymodule/etc/frontend/di.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&...
sulman's user avatar
  • 529
1 vote
2 answers
162 views

Showing customer eav attrribute in product page always shows cached data

I've created a customer EAV attribute and trying to show this attribute on the product details page but it always returns chaced data till I run bin/magento cache:flush full_page. I've tried to use ...
AboElnouR's user avatar
  • 213
0 votes
1 answer
254 views

Prevent custom url parameter in Product Page to be Cached

I am working on a requirement to add a custom parameter in the configurable product page URL. This will have the simple SKU to preselect the color in the swatches, something like this: https://site....
Eliacim DAVILA - CENSERE's user avatar
0 votes
1 answer
275 views

How to remove product_list block from cache in Magento 2?

I need to remove the product_list block from cache Class: Magento\Catalog\Block\Product\ListProduct Block: /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml I have ...
Manish Joy's user avatar
  • 1,215
0 votes
1 answer
182 views

Magento totally invalidate varnish cache on every cron group:index run

Our Varnish cache is flushed every 20 minutes. Timewise in debug.log it looks like it's a cache_invalidate like this that fullly flush the Varnish Cache every 20 minutes when group:index cron is run. ...
Jesper Brejning's user avatar
0 votes
1 answer
124 views

Different full page cache per website

I have a multi-website setup and I would like 1 of the websites to use Varnish and but the other website to use Built-in Cache. I have looked and when I change the scope in Stores -> Configurations-...
Goose84's user avatar
  • 2,581
0 votes
0 answers
112 views

Magento 2 :: Fetches the value of PageId and PageIdentifier from cache

I'm trying to get the Page ID and Page Identifier in the footer.phtml template file using the below methods but getting the values from the page cache on the storefront. Using ObjectManager Method: $...
IntraPersonalLearner's user avatar
0 votes
0 answers
175 views

How to get checkout session data with cacheable true in block in Magento 2?

I want to get Checkout session data with cacheable="true" in the block. Actually, I want to update the cart count in the header after add to cart (add to cart on refresh) which is not ...
Yasir Minhaj's user avatar
0 votes
0 answers
156 views

Low Redis Hit Rate? (20%)

I just checked hit rate of Redis via (https://gist.github.com/kabel/10023961). The hit rate is around %20.x - is this normal? The machine has a ton of RAM and CPU available. Redis is locally ...
Kalvin Klien's user avatar
0 votes
1 answer
699 views

Is "page_cache" the same thing as full page cache in app/etc/env.php?

I was reading this article where the author shows how to configure both varnish and redis for Magento 2. In the first portion, he configured Varnish. In the second section, he ends up using this ...
Timothy Fisher's user avatar
0 votes
0 answers
393 views

Magento 2 - How to reflect immediately product stock updates on frontend which happens when the visitor loads product details page?

I wanted to update my product qty and price details when a visitor visits a product details page. To do this I used observer event 'catalog_controller_product_init_after' in MyMagento\app\code\...
Roshan ruzaik's user avatar
0 votes
0 answers
242 views

Private content for a JS script only, without rendering a HTML template

There is a lot of articles, blogs and stackexchange posts about inserting private content into a HTML template with knockout and data-bindings. And I know how to do that. But... How to use Magento2's ...
jacek.ciach's user avatar
0 votes
1 answer
254 views

Customer session variables wiped off when FPC is used

I am working on a Magento 2.4.1 extension that has some special requests where I need your advice on how to handle some technical aspects in a better way. Basically, when a user logs in or a visitor ...
iupaem's user avatar
  • 41
0 votes
1 answer
2k views

How magento 2.4 clean varnish

According to magento Devdocs for Varnish cleaning If you have configure in env.php the --http-cache-hosts parameter magento can clean Varnish cache from admin like it clean its internal caches. This ...
G. G.'s user avatar
  • 1,132
0 votes
0 answers
171 views

Magento 2.4.1 controller cache control

It seems that on my Magento 2 instance the controller methods are somehow cached because I am doing changes, compiling the code, but they are not visible when they are called. I even added a die() ...
iupaem's user avatar
  • 41
0 votes
1 answer
405 views

Magento 2 Show/Hide block based on cookie - Full Page Cache issue

I am trying to show or hide a block based on a cookie. The cookie is set on a form submission and whether the user sees the block depends on if they have the cookie set. I have it working but when ...
sulman's user avatar
  • 529
0 votes
1 answer
321 views

Currency switcher shows different currency in random pages - Caching related issue

I am running magento 2.4.3 and I am having as default currency EUR in my website and as allowed currencies, EUR and USD only. Visiting the site homepage, EUR shows to be the default currency but when ...
Nikos Klavdianos's user avatar
1 vote
1 answer
380 views

Magento 2 and Cloudfront as Full Page Cache

I am using Magento 2.3.6 and I am currently in the research phase to use something interchangeably with Varnish as a Full Page Cache. Due to the fact that we use the AWS architecture, we are ...
Krzysztof Niemiec's user avatar
1 vote
1 answer
1k views

How to flush/clean cache programmatically in Magento 2.4 for category/product page

Like I mentioned in my question I am having a problem with cleaning/flushing cache on category/product pages. I get some code, probably for some older version of Magento but didn't work. Here it is: ...
Franci Melink's user avatar
0 votes
1 answer
464 views

Varnish not loading content from cache when refreshing manually

We have setup varnish on our magento AWS server with nginx ssl configuration. Varnish works fine on all other pages except the homepage. Case 1 - Refresh the page with reload button on browser - TTFB -...
HungryDB's user avatar
  • 896
0 votes
1 answer
408 views

FPC and "upstream sent too big header while reading response header from upstream" error on nginx?

As soon as I enable FPC in Magento 2.4.2, I am getting a upstream sent too big header while reading response header from upstream error when I try searching. It does not happen for all search terms, ...
user4095519's user avatar
2 votes
2 answers
499 views

SetPublicCookie is not working with Full page cache

I have an event triggered on all pages to set a cookie. However, the cookie is created only on uncached page and I don't understand why. Here, my event : <?xml version="1.0"?> <...
Kozame's user avatar
  • 964
1 vote
1 answer
882 views

X-Magento-Vary Cookie Set Incorrectly?

Have noticed that sometimes my X-Magento-Vary cookie is set serving me up non cached pages. Removing this cookie allows the FPC to work fine again. Not entirely sure when these should be set but have ...
harri's user avatar
  • 5,455
0 votes
1 answer
247 views

Magento 2 how to disable Page Cache programmatically?

I need to disable Page Cache so it does not keep old data on the page. When I dIsable it from admin panel it works, but then it gets backs to enabled by no reason. Is there a way I can keep it ...
Oscar Vazquez's user avatar
2 votes
1 answer
2k views

How to debug X-Magento-Cache-Debug MISS

I have one site with FPC cache enabled that is always returning MISS in the X-Magento-Cache-Debug header. How can I debug "who" is marking the homepage non-cacheable? So far I checked the ...
Dani Mora Rabasa's user avatar
1 vote
1 answer
440 views

How to change or set cache key based on browser user agent?

Is it possible to maintain separate caches in Varnish or Fastly for desktop and mobile users? I am trying to load only the required items in the mobile devices instead of loading all CSS files, blocks,...
Sathish's user avatar
  • 829
0 votes
1 answer
129 views

getFullAction is not working when cache enabled

I'm looking to set different response headers for different pages. I have tried with controller_front_send_response_before. The problem is getFullAction method returned the value (cms_index_index) ...
Bilal Usean's user avatar
  • 9,947
2 votes
0 answers
58 views

Generate page cache based on customer level, not at customer group level

In Magento page cache will generate based on customer group. But how to generate page cache by customer id? Lets say category page test.html So Magento will create like this test.html-not-logged-in,...
sivakumar's user avatar
  • 267
0 votes
0 answers
269 views

Magento 2.3.7 - Customer login not working on category pages due to caching

On category pages, we have a custom code that the prices are only seen to login customers but the customer session is not working on category pages. After customer login for some categories pages ...
Ranjeet Singh's user avatar

1
2 3 4 5
10