Hi,
Cachify does not actually cache cookies. I assume you want to exclude cache generation/display when a user request contains a certain cookie?
You can achieve this using the cachify_skip_cache hook, e.g.
add_filter(
'cachify_skip_cache',
function( $skip ) {
return $skip || isset( $_COOKIE['cookie_name'] );
}
);
If you use HDD caching with direct webserver configuration, you need to extend this as well.
nginx
Extend
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_ ) {
return 405;
}
with cookie name as required:
if ( $http_cookie ~ (wp-postpass|wordpress_logged_in|comment_author)_|cookie_name ) {
return 405;
}
Apache (htaccess)
Extend
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
to
RewriteCond %{HTTP_COOKIE} !((wp-postpass|wordpress_logged_in|comment_author)_|cookie_name)
Cheers,
Stefan