Questions tagged [cache]
Question related to Magento default caching system, full page cache or 3rd party caching solutions.
1,159
questions
0
votes
0
answers
14
views
custom context is not working with page caching
I am trying to create a custom context variable in my custom module so created following file
etc/frontend/di.xml
<type name="Magento\Framework\App\Http\Context">
<plugin name=...
0
votes
1
answer
16
views
Magento 1.9 add to cart slow when cached
We have been experiencing an odd issue on some of our sites since moving from Magento 1.7 to 1.9. When a sites cache hasn't been cleared for a while add to cart is extremely slow. This also affect the ...
0
votes
0
answers
10
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:
$...
1
vote
3
answers
38
views
Is there any way to disable cache for frontend price block
Is there any way for disabling price caching in magento frontend
1
vote
0
answers
85
views
Load specific scope configuration data in Multi site
I have three websites in the single Magento 2.4.2 application. When I load any one of the website it will load all the websites configurations data in the configuration cache. I'm looking for a way to ...
0
votes
0
answers
19
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 ...
0
votes
1
answer
46
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 ...
0
votes
1
answer
29
views
Site not using the var/view_preprocessed cache
I have two Magento 2 sites, both which have an identical module.
On site 1, if I update the .phtml template file of the module, I have to go to developer mode and back to production mode to see the ...
1
vote
0
answers
9
views
cache for customer
I am having a strange problem. When some customers login the cache loads with error (the page is lopped and images don't load). But for other clients after logging in the loading is normal. Is the ...
0
votes
0
answers
11
views
From where magento2 fetches result when we select any option from 'sort by' dropdown on product listing page?
From where magento2 fetches result when we select any option from 'sort by' dropdown on product listing page? Does Magento reassign order for the items instantly or it displays result from cached/...
3
votes
1
answer
52
views
Customer Telephone is required, even it is not configured in that store, works after cache clear, for some time
Since several days (we did not make any code changes, besides the recent the CVE-2022-24086 patches), customers in a certain store of multi-website store cannot order, because Magento requires the ...
0
votes
1
answer
42
views
Magento2 How to restart varnish with magento cache clean / flush
I have setup varnish and varnish is working okay with service varnish restart command
but i want to restart varnish with php bin/magento cache:flush command.
Does anyone suggest me how i can do this .
0
votes
2
answers
24
views
cache problem iusse by adding dynamic product detail tab
I developed module to adding dynamic product tab in product detail page shown in pic below.
but one issue arrive when we add new tab from admin-side then it doesn't at frontend of product detail page ...
1
vote
1
answer
29
views
How to setup different Varnish cache blocks based on request?
I have a redirect in my store that shows a different store view based on the client's location.
It reads the header via Fastly and redirects the customer to a different store view using every time the ...
0
votes
0
answers
30
views
"cacheable = false" not working on a modal
I'm developing a modal that allows the user to select a car model, and, when it is selected, it loads the different variations of rims that the user can fit in their car. It is working as intended so ...
0
votes
0
answers
67
views
Magento Graphql Cache issue
I have an issue with Magento graphql cache.
Magento PWA setup is on Magento cloud.
Default graphql query cache is not working with fastly.
Any suggestion?
0
votes
1
answer
88
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 ...
0
votes
0
answers
18
views
Prices sometimes displayed in wrong format when price rule applied
A client complained that discounted product prices were appearing in the front end of a Magento 2.3.6 store in this format:
The expected look is like this:
Whilst no cache or indexing issues are ...
0
votes
1
answer
45
views
Was Magento 2 caching disabled?
Recently, I worked a long time to find the problem cause running the website was too slow. Because of disabled the Magento 2 cache.
But I am not disabled manually or by command.
I updated the ...
0
votes
0
answers
32
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() ...
0
votes
2
answers
40
views
Updated CSS in pub/static doesn't reflect in browser!
Recently I got an odd issue regarding the CSS changing.
Here is the problem:
I change the CSS in the theme folder, delete the file in the pub/static. I do static content deploy via SSH and cache flush ...
0
votes
1
answer
51
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 ...
0
votes
2
answers
30
views
Latest data doesn't show at front end after addding data in my custom module
Latest data does not show at front-end after submitting form in my custom module.
when I clear cache then latest data show at front end.
Help me! how to fix that problem.
when I disable cache my ...
0
votes
1
answer
30
views
How to resolve Varnish Server Caching Issue in Magento 2?
in my setup, I need to clear varnish caching at the server at all time
even I make small changes then also need to clear the varnish cache at the server side
so can anyone help me with this?
0
votes
1
answer
189
views
Magento 2: clear config cache after save config value
Please see this code first
public function setRefreshToken($token, $store = null) {
$scope = 'default';
$scopeId = 0;
if ($store !== null) {
$scope = 'stores';
...
0
votes
1
answer
47
views
Cacheable blocks independent of query params
Hello #realmagento folks,
How to make page blocks cacheable based on the store-id & request-URI (irrelevant of query params though) in Magento 2?
/some-page -> blocks are cached
/some-page?abc=...
0
votes
1
answer
139
views
Magento 2: How to check the localStorage.getItem('mage-cache-storage') value is empty?
How to check if the localStorage.getItem('mage-cache-storage') is empty in Magento 2?
It is returning {}.
Please guide. Thanks!
0
votes
1
answer
116
views
Redis cache getting full
I'm running into a problem of Redis cache getting full, then when the client tries to Flush Cache through Magento Admin, it returns an error and signs out. It's necessary to always clean it through ...
1
vote
1
answer
125
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 ...
0
votes
0
answers
16
views
Some category images not loading Magento 2
I am having a strange issue where SOME of the category images are not loading but others are. It happened after I indexed the site and the indexer failed. However, I have managed to successfully ...
0
votes
0
answers
29
views
Magento 2 : Image cache issue when update bulk product programmatically
In my case, I have to update product images and other data programmatically from API in Magento.
All data is updated after the indexer command but for new images, I have to flush the product image ...
0
votes
1
answer
38
views
Magento 2.3.4 images 404 after caching. Reappear after flush catalog images
I have migrated from Magento 1. The migration seemed to go fine. Orders and products are in.
I have not installed any themes as I wanted to get it running on Luna before changing anything.
So the ...
0
votes
1
answer
84
views
Full page cache is not working for HTML
Magento 2 is configured to use redis for full page caching, caching is working normally for images, as shown in the below response header:
Cache-Control: public
But it is not working for html pages:
...
0
votes
1
answer
208
views
Magento 2 Redis L2 cache preload suffix :hash or :version
Reading the Magento 2 documentation is a little bit confusing.
Should I use the suffix :hash or :version?
If you visit https://devdocs.magento.com/guides/v2.4/config-guide/redis/redis-pg-cache.html#...
0
votes
0
answers
14
views
Cache types are Invalidate while product saving in admin
main.DEBUG: cache_invalidate: {"method":"GET","url":"http:/","invalidateInfo":{"tags":["cat_p_6","cat_p_9","...
0
votes
0
answers
22
views
How can i list of all custom cache tags?
I have been using the afterGetIdentities for products to set my custom cache tag.
i.e - related to a specific DateTime condition.
for example, i am adding this cache tag ...
0
votes
1
answer
79
views
Magento 2.3.2 - Problems with merged CSS/JS file cache on production
We experience an issue almost every single time we deploy new code to the website, whereby we get 404 errors for merged CSS/JS files. To me, this seems like there is something pointing to the location ...
0
votes
0
answers
17
views
Is it possible to add any additional info to product cache tags?
I would like to add additional information on product cache tags.For example, i would like to set a date/year as below
i.e
$tags[] = Product::CACHE_TAG . '_' . $this->getProductId() . '_' .'...
0
votes
0
answers
44
views
Magento 2 | Flush catalog images in production mode
I updated the photos of the products already existing on my site in Magento2 and they are in production mode.
Unfortunately I don't see the updated photos, not even when I clear all the cache so I ...
0
votes
1
answer
166
views
How to remove cache images if they not in used in magento 2?
i need to create new script if the image not present in real folder and not in used than delete from cache folder
example
Cach folder image
pub/media/catalog/product/cache/...
0
votes
0
answers
23
views
1 exception(s): Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:
Magento 2.3.4
Noticed some of my menu options are not working and in Cache Management I am now faced with a white screen and lots of errors. I tried to paste the whole thing but this site thinks it is ...
0
votes
2
answers
84
views
.phtml file changes won't show, even though my static files and cache are cleared
So this is driving me a little nuts,
I'm working on a child theme of Luma and the design requires me to modify some of the catalog blocks, so I've copied over a .phtml file into my theme folder.
The ...
0
votes
1
answer
188
views
What kind of caches are cleared automatically after product edit in Magento 2?
After reading some comments on the ticket magento2/issues/25670 what I can understand is Magento 2 creates/stores a tag for each entity which is modified. For example if a product is modified it's tag ...
0
votes
2
answers
41
views
Disabling cache for a certain block used in the product page
I would like to load a certain message based on a certain hour range on the product page.
In the catalog_product_view.xml I have this block:
<block class="Vendor\Products\Block\Usp" name=&...
0
votes
1
answer
16
views
How to modify product data on observer pre cache?
My problem would be the following:
I need to modify the product data on load after the product page was cached.
Everytime I load a product I need to request some data to an api and overwrite certain ...
0
votes
1
answer
59
views
How to not cache configurable product options block?
On the product display page for a configurable product, what block (via the layout .xml files) do I need to mark as cacheable="false" so that the dropdowns of options (e.g. size / colour) do ...
0
votes
1
answer
31
views
The whole website is out of whack after deleting Cache from within the Magento Admin Panel
Magento 2.4.2-p1
Porto theme
We have:
Installed fresh Magento 2.4.2-p1
used the Magento Migration Tool to migrate from Magento 1.9.4
installed the Magento Porto theme
Amasty installed a bunch of ...
0
votes
1
answer
32
views
My Magento site become unhealthy for at least 5 minutes on cache flush (Blocks HTML output)
on every cache flush either from cli or using System --> Cache Management -- Flush Magento Cache my frontend is down for at least 5 minutes. I cleared cache manually by clearing 1 cache at a time ...
0
votes
1
answer
234
views
Is there any way to flush cache (periodically) using Magento 2 cron?
I need to flush some types of cache (or maybe all of them) by Magento cron tasks (not system native), also I might need it to be done periodically, is there any way to do this?
0
votes
1
answer
139
views
magento cli not working for any command and gives a long error
i have magento 2.2.3 . for deleting cache or enabling modules or any other usage of magento cli i take one error . it begins with this phrase
Unknown package has no name defined
and it is continuing ...