Cache by User Role rather than by User




Wordpress LScache Plugin: Cache by User Role rather than by User

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, Is there a way we could enable caching for logged in users by role, rather than by user? I would think this would be much more efficient if you have a bunch of users, and if it made sense to do that. Then use ESI as needed ? perfect! Thanks! Jake I believe that Ive found a solution: disable the [Cache Logged-in Users] option, and utilize the [Vary Group] feature: https://blog.litespeedtech.com/2017/09/13/wpw-vary-groups/ Hi Jacob. I am checking different options like you. Finally was working fine this option? In my case I have two extra user roles that I want to use same cache for boths, but using the option that appear in your link to specify same number for both dont work for me, only save same number one time, I think its a bug. But mainly I want to ask you about the values you set on TTL to maintain all pages cached full time. In my case, seems I lose the cache very fast and I tried a lot of combinations. Thanks! Hello @rafasshop, I created a thread regarding the vary group bug you mentioned, and they said that it would be fixed in v3.0: https://wordpress.org/support/topic/cant-assign-vary-group-to-more-than-one-role/ I havent experimented much with the TTL settings yet, so I cant help there. Sorry about that. Have a great week! Jake



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference