Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

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
0 votes
0 answers
11 views

Is it possible to use Price AdjustmentInterface with Cache Context?

I know how Price Adjustment through the AdjustmentInterface (e.g. 10% off prices) work. (Magento\Framework\Pricing\Adjustment) (docs: https://developer.adobe.com/commerce/php/development/components/...
Akif's user avatar
  • 1,541
0 votes
0 answers
18 views

Filter Product Collection while Using FPC

I'm working on a project right now with about 200k customers that are broken down into 2000 groups. We haven't used customer_group for this because of the large number. But because we have a ...
Gaurav Agrawal's user avatar
0 votes
2 answers
157 views

Not able to access Customer Session via custom module in Magento 2

I'm not able to access the customer session in my custom module. However, when I'm navigating my custom action to salesrep/index/account I'm able to get the customer session. But when I'm navigating ...
Bojjaiah's user avatar
  • 4,002
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
1 vote
1 answer
25 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
46 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
169 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
130 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,418
0 votes
0 answers
73 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
52 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
46 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
101 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
40 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
437 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
165 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
179 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,611
0 votes
0 answers
35 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
80 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
36 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
204 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
426 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
710 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
176 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
241 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
171 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
270 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
306 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
190 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
126 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,611
0 votes
0 answers
114 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
178 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
175 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
783 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
405 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
249 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
313 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
  • 53
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,162
0 votes
0 answers
188 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
  • 53
0 votes
1 answer
439 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
372 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
405 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
2 answers
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
480 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
  • 906
0 votes
1 answer
427 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
520 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
996 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,475
0 votes
1 answer
277 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
466 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

1
2 3 4 5
10