nicolargo / varnish-nginx-wordpress

A "simple" Varnish ang NGinx configuration for a Wordpress blog
307 stars 85 forks source link

Preview is being cached #17

Open DanielGarzaB opened 9 years ago

DanielGarzaB commented 9 years ago

How to avoid caching preview pages?

Oyabi commented 9 years ago

Can you give me more information ? Preview page was generated by a plugin ? Can you give me the preview page's url ? Anyway oyu juste have to add domething like that:

if (req.url ~ "/(cart|my-account|checkout|addons|/?add-to-cart=)") {
    return (pass);
}

or that:

# Did not cache the admin and login pages
if (req.url ~ "/wp-(login|admin)") {
    return (pass);
}

;)