I am using Boost and Cache Expiration. My site generates nodes automatically and adds them via
node_save(). I have setup Expire to get triggered on node insert, update and delete and to let the front page and the node page expire (see screenshot).
The problem is now: When the site is under high traffic, the front page does not get expired. When the traffic is low, the expiration works as it should.
I could reproduce this error even locally: While adding a node, I let
wget constantly accessing the front page on my local host. As on the production server, the front page did not expire.
My hunch for the reason now is that the following happens within some milliseconds:
node_save(), the new node get only scheduled to be saved but not saved yet.
The cache although, gets flushed immediately.
A new request to the front page is made, it gets delivered and its old version gets cached again.
The scheduled node save operation finally gets written to the database. But it has no effect to the front page, since it is already cached.
Do you think that my hunch is correct? If yes, what should I do? And if no, what could be the reason instead and what should I do?