Allow cached pages to be delivered to logged in users (#19). Remove the _is_logged_in() method and instead allow the cookies Cache Exclusion to control this. This was already the current behavior when a page had already been cached as the advanced cache is only checking the cookie names. By default the cookies Cache Exclusion setting will bypass the cache when logged in.
If a certain user role needs to be bypassed a custom cookie, such as user_admin=1, can be set. The cookies Cache Exclusion option can then be updated (e.g. /user_admin/). This can be done in many different ways, one being a custom function in the functions.php file that uses wp_get_current_user() and setcookie(), for example:
Allow cached pages to be delivered to logged in users (#19). Remove the
_is_logged_in()
method and instead allow the cookies Cache Exclusion to control this. This was already the current behavior when a page had already been cached as the advanced cache is only checking the cookie names. By default the cookies Cache Exclusion setting will bypass the cache when logged in.If a certain user role needs to be bypassed a custom cookie, such as
user_admin=1
, can be set. The cookies Cache Exclusion option can then be updated (e.g./user_admin/
). This can be done in many different ways, one being a custom function in thefunctions.php
file that useswp_get_current_user()
andsetcookie()
, for example:Closes #19