-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable cache for logged in users #22
Comments
WP use wp_get_nocache_headers() to set no-cache headers for logged in users. It seams, You can modify this header to control cashing in Surge. Example: somewhere in the theme's functions.php:
|
I tried using the header_remove() code snippet above, and it wasn't working properly for me. I tried nocache_headers() instead, and that seems to be working. https://developer.wordpress.org/reference/functions/nocache_headers/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, first of all thanks for the excellent plugin, it works incredibly well out of the box!
I have been poking through the plugin source code and I can't seem to find the logic that disables/prevents caching for logged in users.
What I am hoping is possible is that I can create a custom config file like this Surge Configuration Example. And setup some logic to enable caching for logged in users with a certain custom role (essentially a role that only has frontend access).
If you could point me in the direction of how Surge currently identifies logged in users I'd really appreciate it.
The text was updated successfully, but these errors were encountered: