You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The caching system works properly, however, it happens that if caching is stored with me as the user, visitors who visit the page end up with my name as the logged-in user in the navbar.
How can I avoid having items cached that should only be seen by logged-in users?
The text was updated successfully, but these errors were encountered:
What you're trying to do is probably outside the scope of this caching extension at the moment. However, here's something you can do to begin accomplishing this:
Load your sensitive data through ajax.
This caching extension is only going to cache the response from specific controllers. so If you're using an ajax loading system to populate certain datasets, then the core of the page gets cached and your sensitive content is loaded via ajax (not a cached route)
Personal I only use the middleware on public routes (that doesn't have any user information visible) If the current user is the only different part it can be an option to use the ajax way as described by @jonathonbyrdziak
Else I think it is more useful to cache parts of your response and not the whole page (but that is out of scope for this package).
The caching system works properly, however, it happens that if caching is stored with me as the user, visitors who visit the page end up with my name as the logged-in user in the navbar.
How can I avoid having items cached that should only be seen by logged-in users?
The text was updated successfully, but these errors were encountered: