Support » Fixing WordPress » fastcgi_cache and comments

  • Rather than use individual WordPress-specific caching I have installed server-wide caching using Nginx Proxy Cache Purge (which works OK) on a 1.6.0 nginx with php-fpm. This all works very nicely, particularly since I remembered to enable zlib so that cached responses are pre-gzipped!

    However there are two questions:

    1) All configurations I have seen treat fastcgi_cache_bypass (don’t read from cache) and fastcgi_no_cache (don’t write to cache) the same.

    This may be right for logged in visitors because you don’t want the top ribbon or other stuff cached but surely where comments are being added by non-logged in visitors, why would these not be written to the cache? Or does it matter? It could easily be done by using two variables rather than $skip_cache or $no_cache…

    2) Is there any way in which the front page (or blog page) could be updated when a comment is made (and approved)? At the moment the actual post will show the number of comments correctly but the synopsis or whatever on the blog page is read from the cache. Ideally we need the blog page to be purged whenever any comment is written. When a new post is added, it is visible immediately which is correct but the comment count is not right.

    Any ideas how to deal with this?

  • The topic ‘fastcgi_cache and comments’ is closed to new replies.