Serve Public to Private or create Vary for Role
-
I have a site with WooCommerce where customers can log in to get role-based prices. The prices are served via REST. So, what I really want is for the logged-in users to be served the Public Cache and not the Private Cache, which I understood was not possible, correct? The site has over 2,000 pages, so I’d rather not add varies if not absolutely necessary.
As a result, I’ve come to the conclusion that I need a variation for the WP Role that the logged-in users have (Reseller). After reading the documentation, I realized that to achieve this, I need to:
- Turn off “Cache Logged-in Users.”
- Create a variation group for the role under the “ESI” tab.
- Create a “Dummy User,” assign the role to it, and simulate that user in the crawler.
However, this does not work at all. After extensive troubleshooting, I discovered that ESI needs to be enabled. In the documentation, it explicitly states that it does not need to be enabled. Am I misunderstanding something here, or is the documentation wrong?
I also found a workaround, if I add this action to functions, the ESI-option do not seem to be enabled.
do_action( 'litespeed_control_force_public' );
- The topic ‘Serve Public to Private or create Vary for Role’ is closed to new replies.