Hi @derlehre,
You don’t need to manually exclude those roles. Masteriyo detects when LiteSpeed Cache is active and automatically prevents caching on the pages that actually need it: checkout, login, signup, instructor registration, the Learn page, and the Account pages. It sets DONOTCACHEPAGE and sends no-cache headers on those specific pages for every visitor who lands on them, so it doesn’t matter whether the visitor is a student, instructor, author, or admin.
This is actually more precise than a role-based exclusion: excluding whole user roles from cache (as LiteSpeed’s Cache Exclude settings do) would stop caching for every page those roles ever visit, not just the dynamic Masteriyo ones, so course archives, single course pages, etc. would lose caching too, for no reason. Masteriyo’s approach only turns off caching where the nonce-bearing, per-user content actually lives.
One related setting worth checking: in LiteSpeed Cache → Cache → Advanced, make sure “Cache REST API” is disabled. Masteriyo’s dashboard and account pages rely on REST calls, and caching those responses can cause stale data. If it’s on, you’ll see a notice about it directly in your WordPress admin.
@sauravkhanal Hello dear
Thanks for your response. So there’s no need to do this? Right?
View post on imgur.com
-
This reply was modified 6 days, 1 hour ago by
derlehre.
Hi @derlehre,
Yes, that’s right; no need to do anything manually. As long as LiteSpeed Cache is active, Masteriyo automatically excludes the checkout, login, signup, instructor registration, learn, and account pages from caching for every visitor, regardless of role. You don’t need to add those four roles (author, administrator, student, instructor) to LiteSpeed’s cache exclusion list.
The only thing worth double-checking on your end is that “Cache REST API” is turned off in LiteSpeed Cache → Cache → Advanced, since that’s a separate setting Masteriyo doesn’t control.
thank you so much desr @sauravkhanal you help me in hard moments. Even the host provider didn’t pay attention to my ticket about caching but you helped me accurately. Thank you so much dear. And Thanks for your time.
Thank you so much for your kind words! We’re really glad to hear that everything is working well for you @derlehre .