boost cache clearing #46

Open
paradoxni opened this Issue Apr 12, 2012 · 6 comments

Comments

Projects
None yet
2 participants

Can anyone help regarding boost cache not clearing for submenu items/pages. When new items are published the root _.html files get cleared and a new page is generate, however its not working for sub pages e.g. www.site.com/page1/ - these boost pages become stale.

For now we have a cron delete the boost cache, however sometimes this is giving 404 errors in the logs as the _.html file has been deleted just before the request for the page.

Any experience with similar issues/ideas?

Thanks,

2012/04/12 16:11:07 [error] 6456#0: 214867 open() "/web/www._.uk/cache/normal/www..co.uk/.html" failed (2: No such file or directory), client: ..., server: x, request: "GET / HTTP/1.1", host: "www.***.co.uk"

I am now thinking this issue is caused by Varnish.

It seems varnish is caching static files inc. CSS however if the CSS file changes on the backend /cache/perm/ then the reference in the varnish cache is outdated and creates a 404 request.

I guess the only option would be to send CSS / JS requests directly to the backend and not cache in varnish.

Owner

perusio commented Apr 19, 2012

Try to drop Varnish and instead use a pure Nginx setup (with microcaching) or Nginx + Boost. See how it behaves.

Recently disabled varnish completely, however still getting seemingly random 404's on my homepage when using the boost module.

I am now testing this without Varnish. Nginx + Boost only. When the cache gets emptied, on my next request to the homepage I get a 404 and the log shows:

2013/01/24 14:11:59 [error] 12631#0: *8 open() "/web/www.site.co.uk/cache/normal/www.site.co.uk/_.html" failed (2: No such file or directory), client: x, server: www.site.co.uk, request: "GET / HTTP/1.1", host: "www.site.co.uk"

If I then refresh the homepage it loads normally as the boosted cache files have been recreated and serve ok.

Is this normal behaviour?

Could enabling an nginx microcache for .html allow time for the boost cache page to be regenerated?

Owner

perusio commented Feb 5, 2013

You shouldn't use microcaching with boost. The reason being that the HTML page generated by Boost
can be removed without Nginx being aware of that.

Could enabling an nginx microcache for .html allow time for the boost cache page to be regenerated?

Definitely. Try it out and report back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment