Skip to content
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

Works only on the homepage #20

Open
jcmartinez opened this issue Oct 11, 2020 · 1 comment
Open

Works only on the homepage #20

jcmartinez opened this issue Oct 11, 2020 · 1 comment

Comments

@jcmartinez
Copy link

I can see the headers X-LiteSpeed-Cache: hit or X-LiteSpeed-Cache: miss only in the homepage. I cannot see these headers in other pages of the site.

How to reproduce
I added this module to an existing site, enabled the module and enabled the Debug option.

Expected behavior
I would expect to see a hit or a miss on every page.

Things I've tried

  1. I have looked at the pages as an anonymous user.
  2. I've also tried using Chrome Incognito Mode.
  3. I have uninstalled the core Drupal Internal Page Cache module suspecting a conflict while leaving installed the Dynamic cache module.

Thank you for your work on this module.

@yoyo-rk
Copy link

yoyo-rk commented Mar 22, 2023

If your Drupal site is setting a session cookie on non-homepage pages, then it's likely causing Drupal to set the cache-control headers with must revalidate, private, no cache etc. Usually a session cookie will be set on pages that have search or input fields, login fields, or other features that require tracking a session data. We experienced this on our site and had to make some adjustments to our pages. LSCache will basically tell LSWS to cache any page that Drupal would normally set cache control headers on to public, max-age=XXXX. So you have to do the work in Drupal to get LSCache to act as desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants