litespeedtech / litespeedtech/lscache_wp

"Force public cache" generates separate cache for logged and unlogged users

Open
#217 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
257
Forks
123
PR merge metrics
No merged PRs in 30d

Description

Plugin version: v3.0.8.3

Hi,
I have a shop based on WP + Woo and I set up "Force public cache" for all products and it works very well for not logged in users, even if they add something to their shopping cart. The problem occurs when a user logs in then each products generate cache again.
Looks like cache is generated in two versions for a logged users (not private cache per user) and not logged users. If another logged user opens a product for which a cache has been generated by another logged user, he receives correctly page from cache. This is problematic for the preload cache because it is generated only for version non logged users.

Any idea why two versions are generated for a public cache and with the same x-litespeed-tag ?

How I checked

  1. Clear all LS caches
  2. Unlogged user do request for product x:
    x-litespeed-cache: miss
    x-litespeed-cache-control: public,max-age=604800
    x-litespeed-tag: 368_HTTP.200,368_product,368_URL.10e89d8ae698c8d7172069fb4c7ffb93,368_Po.6605,368_
  3. (refresh) Unlogged user do request for product x:
    x-litespeed-cache: hit
  4. Logged user do request for product x:
    x-litespeed-cache: miss
    x-litespeed-cache-control: public,max-age=604800
    x-litespeed-tag: 368_HTTP.200,368_product,368_URL.10e89d8ae698c8d7172069fb4c7ffb93,368_Po.6605,368_
  5. (refresh) Logged user do request for product x:
    x-litespeed-cache: hit
  6. Other Logged user from other browser do request for product x:
    x-litespeed-cache: hit
  7. Other Unlogged user from other browser do request for product x:
    x-litespeed-cache: hit

** I tested these cases with on and off private cache for checkout

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are identified. Start by reproducing the logged and unlogged product requests with Force public cache enabled, following the numbered steps and comparing cache headers. Done means the duplicate public-cache behavior is understood and corrected, with preload and both user states verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.