Skip to content

x-magento-cache-debug: UNCACHEABLE Multi-store setup #39880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
5 tasks
WebHostingAce opened this issue May 1, 2025 · 7 comments
Open
5 tasks

x-magento-cache-debug: UNCACHEABLE Multi-store setup #39880

WebHostingAce opened this issue May 1, 2025 · 7 comments
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p5 Indicates original Magento version for the Issue report.

Comments

@WebHostingAce
Copy link

WebHostingAce commented May 1, 2025

Preconditions and environment

  • Magento 2.4.7-p5
  • Multi-Store Setup
  • Varnish 7.6 / Magento 2 Provided VCL
  • For Multi-Stores, setup using - SetEnvIf Host sub.domain.tld* MAGE_RUN_CODE=xxx | SetEnvIf Host sub.domain.tld* MAGE_RUN_TYPE=website

Steps to reproduce

#curl -I https://sub.domain.tld (Multi-Store)
x-magento-cache-debug: UNCACHEABLE - Always

#curl -I https://domain.tld (Main)
x-magento-cache-debug: HIT

Expected result

#curl -I https://sub.domain.tld (Multi-Store)
x-magento-cache-debug: HIT or MISS - accordingly

Actual result

Any Multi-Store (setup with SetEnvIf) always produce "x-magento-cache-debug: UNCACHEABLE". This can be a subdomain or different domain other than the main domain.

Additional information

MAIN.cache_hit 66308 3.00 4.02 3.49 3.49 3.49
MAIN.cache_hit_grace 33 0.00 0.00 0.00 0.00 0.00
MAIN.cache_hitmiss 266315 9.99 16.14 13.28 13.28 13.28
MAIN.cache_miss 594774 22.98 36.04 29.15 29.15 29.15
MAIN.beresp_uncacheable 553526 23.98 33.54 25.66 25.66 25.66

without cache, browser will first return "x-magento-cache-debug: UNCACHEABLE" when refreshed, it will return HIT or MISS accordingly.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented May 1, 2025

Hi @WebHostingAce. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

Copy link

m2-assistant bot commented May 1, 2025

Hi @engcom-November. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@WebHostingAce
Copy link
Author

The Varnish VCL provided in the Varnish Developer Portal (https://www.varnish-software.com/developers/tutorials/configuring-varnish-magento/) seems to be working as expected. After reviewing the available options, the vcl_backend_response hook has been selected for use, as it fits the current requirements and handles the desired functionality without any issues. Monitoring will continue for any potential improvements or changes moving forward.

@engcom-November engcom-November added the Reported on 2.4.7-p5 Indicates original Magento version for the Issue report. label May 2, 2025
@engcom-November
Copy link
Contributor

Hello @WebHostingAce ,

Thank you for your report and collaboration.

We attempted to reproduce the issue in our latest version 2.4 develop but were unable to reproduce it. Please find the attached screenshot for reference.

Image Image Image Image

Steps to reproduce

  1. Setup the Varnish
  2. Create the Multi store
  3. Hit the Both url and verify

We followed these steps and did not encounter any issues. Could you please recheck in the latest version of Magento and let us know if we are missing any steps to reproduce this issue?

Therefore, we are marking this ticket as "Issue: Needs Update".

Thank you!

@engcom-November engcom-November added the Issue: needs update Additional information is require, waiting for response label May 6, 2025
@ct-prd-projects-boards-automation ct-prd-projects-boards-automation bot moved this from Ready for Confirmation to Needs Update in Issue Confirmation and Triage Board May 6, 2025
@WebHostingAce
Copy link
Author

@engcom-November Thank you for the update.

My setup is NGINX / Varnish / Apache

Could you please try,

#curl -I https://sub.domain.tld/ (to the Multi-Store)

@engcom-November
Copy link
Contributor

engcom-November commented May 7, 2025

Hello @WebHostingAce ,

Thank you for report and Collaboration,

We have verified this issue by setting up the NGINX and varnish, But we are unable to reproduce this issue, could you please recheck and let us know if your still facing the issue.

Image Image Image

Hence marking as "issue: Needs Update"

Thank you

@WebHostingAce
Copy link
Author

WebHostingAce commented May 7, 2025

@engcom-November Thank you very much.

Lastly, could you please delete the all cookies for the subdomain (Multistore) and try again?

If I refresh the browser, it works as expected. This issue only appears in the first load. Then the Multistores start working as expected.

I have noticed, I get the X-Magento-Vary Cookie in the first load of the Multi-Store but not in the Main Domain which is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Reported on 2.4.7-p5 Indicates original Magento version for the Issue report.
Projects
Development

No branches or pull requests

2 participants