How would it be the best solution to avoid caching if a cookie is present?
I'm running an archive of documents which can be downloaded by registered users and serving caching pages to non-authenticated visitors. Once you login (not as an WP author but as a ‘subscriber’ via an special plugin), there is an extra cookie on your browser. Therefore, you have to receive dynamic pages (not cached at all).
So far I've solved this changing the line 24 of wp-cache-phase1.php:
- if (!$cache_enabled || $_SERVER["REQUEST_METHOD"] == 'POST') + if (!$cache_enabled || $_SERVER["REQUEST_METHOD"] == 'POST' || $_COOKIE['mycookie'])
But I am wondering if this can be also done by a wp-super-cache plugin… Any thoughts?