• Great plugin. Just 1 small issue. We use nginx as a reverse proxy and would like to use it as another layer of caching. At the moment when cached pages are served, they are served with strict no caching rules.

    /* don't allow browser caching of page */
    header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0');
    header('Pragma: no-cache');
    
    /* expire at this very moment */
    header('Expires: ' . gmdate("D, d M Y H:i:s", time() ) . " GMT");

    It would be nice if you used a filter/hook so there is a way to modify what expiry to set. Or have a way of setting our own caching headers as an option somewhere in the configuration page.

    Thanks

    https://www.ads-software.com/plugins/wp-ffpc/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter phil1984

    (@phil1984)

    Thinking about this more, since WP-FFPC is acting as a caching layer, perhaps it should be catching and storing the headers with the data like other caches do. After all, if I output some custom header, I wouldn’t want it to disappear if it serves the cached version. The Content-Type header is already put in the meta array anyway. You can access the headers with the headers_list function. The only other issue is with the age part of the Cache-Control header and it should really be calculated on the fly.

    Plugin Author petermolnar

    (@cadeyrn)

    I’ll add a support for this in the next ( 1.10 ) version.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Cache Headers’ is closed to new replies.