Cleaning FastCGI cache automatically?

Hi all,

I’ve been reading about NGINX lately and ran into the following ‘issues’. It seems that caching with FastCGI does not support automatic cache purges ?

For example :

  1. I would like to be able to upload static pages through Filezilla into a certain directory and have the cache update itself immediately (and automatically). I need updates of static content to be reflected immediately in the cache…
  2. I would like to use FastCGI to cache Wordpress files and have the cache update itself immediately after a content update.

Does anyone know if there is a way to accomplish the above requirements ? Is this really not possible with default NGINX ? Maybe there’s a way to do it with EasyEngine ?

Thanks in advance, Lex

Hi Lex,

Nginx-Helper supports flushing the cache on various types of content updates.

Issue one is probably a bit more involved, there’s a few options you could do. How often are you uploading these? If not too frequent, then sudo ee clean --all is probably the easiest after you upload. If it is a periodic thing, I think you could have filezilla trigger ee clean after uploads?

1 Like

You could try Redis-cache and Nginx-Helper add custom purge url ? assume this would work, or if your set on FastCGI you will need to do what @davidedwards suggested or set up the nginx.conf file to do the function.

Thanks for your reply David ! Your solutions makes sense … it’s simple and can be accomplished (not tested yet) bu using WinSCP instead of Filzilla (which does not support shell triggers except some mkdir commands).

I’m have just been reading about NGINX caching and I have another question I am sure that you know how to answer.

It seems that you can set different caches (locations) for different server blocks in NGINX. Does that mean that if I set the same cache for the server block of my wordpress site, as well as for the domain that serves only static files, I should be able to purge through NGINX helper wordpress module. In the end, it’s the same cache that wordpress and the static files use.

I’m I getting this right ? Or could that lead to trouble ?


Thanks for your reply … I don’t exactly know what you mean (yet) but I’ll have to look into that :slight_smile: