Jump to content

Website performance with ProcessWire, nginx and fastcgi_cache


gurkendoktor
 Share

Recommended Posts

Hi, 

I don't know if this is the right section for this but I collected some thoughts and a kind of manual about how to increase the performance of your website under load with nginx and fastcgi_cache.

At best, this could be a kind of ProCache for nginx users, as not everyone is using Apache and thus not able to use ProCache on their sites.

Additionally, this solution comes with the benefit of server side mobile detection and selective caching. 

http://svn.matthiashaak.com/website-performance-with-processwire-nginx-and-fastcgi_cache/

Please let me know your thoughts or questions about this. Be aware however, that with this solution you end up serving static pages, so no hooks or PHP functions will be called. 

I am currently working on a module that eases the cache purging, so kindly be patient if you need this. "Wait, and thou shalt receive" :)

  • Like 12
Link to comment
Share on other sites

  • 3 months later...

For some reason I didn't get notified about your post, but you're right with the headers. Depending on the rest of your config, you actually might need to add this line. Exactly this cost me 30 minutes today, I just couldn't get it to work on a new installation. Thanks for pointing this out.

As with the cookie, the "=" version should, according to the documentation, work - but yours will definitely work better. I personally removed this part, because for my use case it's enough to know whether I'm using the admin area or not. Anyway, I will also update this part. Thanks for you input. 

The clear cache module is also taking shape (way too slow for my taste, but I only have so much time…), and should be ready for a first test drive soon.

  • Like 4
Link to comment
Share on other sites

ok, whoever uses this and wants to test drive the purging module, here it is:

https://github.com/gurkendoktor/processwire_purge_fcgi_cache in branch develop

Just install it and you're good to go. I will prepare a README later.

Looking forward to feedback or if it makes any sense for anyone except me. 

Known issues:

* You will see errors if the page has not been cached yet

* You will see errors if no page at all has been cached

* The UI is still a bit of a mess

  • Like 2
Link to comment
Share on other sites

  • 8 months later...

Hi gurkendoctor

Any plans on an update for your module? :-)

I've installed it a bit back, but I have issues with saving pages.. Maybe it's just me that setup Nginx wrong, but your module fails to purge the cache whenever I save a page, so I was looking to see if the module were updated, but it hasn't changed for a while.

Link to comment
Share on other sites

  • 1 month later...

Hey, sorry for the long break here and on the module. I just moved to another country on another continent, and after 4 weeks I moved again in this city I'm living in now, so there were some tideous tasks that required more effort than I thought. I just picked up developing things and writing about stuff again, and will share any improvements on this module here.

However, many things haved changed in processwire itself since then, so I have to first read some docs to keep up with all of the things happening.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...