Wordpress LScache Plugin: Vary Groups dont allow assign same number in two or more
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello! My inform number: FXXKUSAX We have exactly same situation than described here: https://blog.litespeedtech.com/2017/09/13/wpw-vary-groups/ B2B store, with 2 differents prices in products, with tier prices, etc, and all depends on user role, if is a visitor, customer, wholesaler? So actually we starting trying to have 3 cached versions. 1. Visitors (not logged in) 2. Customers (recently registered visitors that are logged in). Here the showed version is the same than for not logged in visitors, so I dont know if is possible to share same cache version. 3. Wholesalers (visitors with wholesaler user role assigned and logged in too to view different prices) I am trying this: http://prntscr.com/ovmjm0 ? Disable the in cache tab the generate cache for logged users. I am not sure if is right to have disabled or need to be enabled when using Vary Groups. Can you confirm? ? On ESI tab on Vary group I have two user roles trying to put same number to share same cache, but when I click on save, only put in one of them and the other change to 0. Is like is not allowed to use same number to share cache. ? Now I am not sure if its fine to left all other options in 0, due for customer user role, will be the same content to show than for not logged in visitors or others user roles like author, contributor, editor, etc? Maybe I need to put any number and repeat the same in all of them, but need to be different than 0 to cache has been generated? Thank you! ? Disable the in cache tab the generate cache for logged users. I am not sure if is right to have disabled or need to be enabled when using Vary Groups. Can you confirm? Yes, if you dont want to have a cacher per logged in user please turn it off. ? On ESI tab on Vary group I have two user roles trying to put same number to share same cache, but when I click on save, only put in one of them and the other change to 0. Is like is not allowed to use same number to share cache. Yes, currently each group need to have a unique number, is it ok if you separate that two groups into two caches? Hello @stanleylitespeed . Thanks for your reply. In your wiki appear that should work: https://blog.litespeedtech.com/2017/09/13/wpw-vary-groups/ If two user roles share the same view, put them in the same group by using the same number. In other words, if author and editor both have the same view, but its different from everyone elses view, author and editor could both be given the number 22, while everyone else remained at 0. For my situation, wholesalers user role represent high percentage of customers, but I have other user role called wholesaler_re that are exactly the same and we only have 20-30 users right this situation. So in this case litespeed an server needs to generate again same cache for other group using server resources and is not sense. But its ok, for the moment I will put other number. I simply notify thinking that can be a bug here based on your documentation. So based on this vary group . I understand that now I only need to put in crawler settings the ID of one customer by role, to be generated all different caches, right? Thanks. Hi, Lets say you have 20 users , user ID 1 is admin , put it aside, ID 2 ? 10 are group1 , and ID 11-20 are group2 In this case, if you put any number between 2 ? 10 , the whole group of group1 , as of user 2 ? 10 , will get same cache due to they are in same role Best regards, Hi @rafasshop, thanks for the report, we confirm its a bug. Heres a temporary fix file, please try to replace wp-content/plugins/litespeed-cache/admin/litespeed-cache-admin-settings.class.php by following content: https://gist.github.com/stanleybz/37e687e27a3f76610b41ca8ff52dd504 Weve added row 1411 to 1415 for preventing duplicate role removal. Hello. Is working now with the fix. Thank you! Regards. Hello. Please, add this fix in next updates to avoid overwrite with each plugin update. Thank you. Regards Thanks for the reminding. Will add to next release (if still have one in v2.9) Hi the fix is in https://github.com/litespeedtech/lscache_wp/commit/551a86f7ca14510f9c5e7572612c41f013ce9df3 and will be in v2.9.9.1. Thanks again. Thank you for your work @hailite !
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference