Is Nginx microcaching appropriate for a Drupal forum?

sb56637's picture

Hi everyone,

I use Drupal 6 as a forum with Perusio's config on Nginx/PHP-FPM/MariaDB. There are some lines in the drupal6.conf file that deal with Nginx microcaching:

## FastCGI microcache.
#include apps/drupal/microcache_fcgi.conf;
## FCGI microcache for authenticated users also.
#include apps/drupal/microcache_fcgi_auth.conf;

I tried enabling just microcache_fcgi.conf; and then I tried just enabling microcache_fcgi_auth.conf; but both of them cause comments in forum threads to not immediately appear. Instead, comments would appear 5 or ten seconds later after refreshing the page. This seems like especially strange behaviour when microcaching is only enabled for anonymous users, as I thought it wouldn't do anything for authenticated users.

Is it possible to use microcaching and at the same time see comments appear immediately both for the posting user as well as for other browsing users?

Thanks a lot!


Did you check the headers to

perusio's picture

see if you're hitting the cache or not?

I assume that the session cookie is present, meaning you have a cookie with a name starting by SESS.

Thanks Perusio for the

sb56637's picture

Thanks Perusio for the reply.

Yes, I am hitting the cache. It says:

"Cache-Control: no-cache
X-Micro-Cache: HIT"

This is with only anonymous user microcaching enabled. Yet, I posted this as an authenticated user, so not sure what's going on.

Here's the complete headers:

I do have a session cookie present as well.


Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week