(no title)
darsoli | 5 years ago
On top of that, testing caching is challenging - replicating between local, staging, and prod is ultimately a very manual and error prone process, so there's no real way to figure out how to test and if what you're doing is the right thing. Since caching is not an immediate thing (it can take time for a CDN to pick up an asset, for example), it can be unclear if what you've done works, or if you need to wait five minutes and try again.
I wrote a blogpost a few months ago about this and other issues. (https://solitaired.com/why-we-switched-from-wordpress-to-nod...)
Maybe I'm doing it wrong? ¯\_(ツ)_/¯
ehnto|5 years ago
The strategy is the same even for complex sites, full page cache at the server daemon for almost every page hit unless a user is doing an action that isn't "View this page".
Obviously I'm glossing over cache busting strategies and how you handle dynamic actions like add to carts, sessions etc, but they're all far more simple than rolling your own application level caching strategy.
You will get so much more out of your hosting if using an FPC, which gives you way more headroom for the requests that do need to spin up the application.
snowwrestler|5 years ago
We picked whatever the most popular cache plugin was at the time and turned on the default settings, then went from there. Honestly, the difference between any caching strategy and no caching strategy can be huge, especially when you get a surge of traffic.
We put staging behind the cache too, but not local or dev. Staging was just to test that a caching configuration change would not take the site down. A bunch of the tuning was actually done on production and back-ported to staging.
I think a hidden factor here is what people know. If a person/team knows node.js really well and doesn't know Varnish, then of course it's going to seem easier to move to node. That seems pretty common to me; it's more like web development, whereas caching/Varnish seems more on the sysadmin side of things. My team had to learn it, which took a little while.
But in my experience, well-tuned caching in front of WP can scale really well for content that changes rarely like blog posts or articles.
Today we pay WP Engine take care of it all for us and it's money well-spent.
falcolas|5 years ago
hawkoy|5 years ago
Edit: I see you mentioning cloudfront on your blog post, what problems did you encounter when using it with wordpress?
Also, any reason for not using sanic, strapi or any of the headless CMS and building from scratch?
darsoli|5 years ago
I eventually solved it by futzing with all the options.
Re why I didn't use Strapi/the others? Once I switched to node / markdown, I told myself I'd fit in a real CMS, but never got that far researching it. However, I like the options you mentioned. Thanks for sharing!
innocenat|5 years ago