WordPress / wordcamp.org

WordCamps are casual, locally-organized conferences covering everything related to WordPress.
https://wordcamp.org
127 stars 69 forks source link

Migrate caching to Surge? #771

Open iandunn opened 2 years ago

iandunn commented 2 years ago

Our own @kovshenin released a lean caching plugin that looks really good. It'd be simpler and cleaner than WPSC, so I think we should consider migrating.

We could use nginx microcache if want to go even further, but that may not be worth it.

Any thoughts @ryelle @dd32 @coreymckrill?

dd32 commented 2 years ago

What's the intention behind it? Something simpler and with less options?

I'm unaware of any of the existing shortcomings or issues that the current plugin has though, so I tend to err on the side of don't touch it if it's working.

WordPress.org pretty much exclusively uses nginx caching, which doesn't have purge support, but is only for logged out users and short cache ttl's.

kovshenin commented 2 years ago

Thanks for considering this! I'll be happy to help with the setup (there isn't much, really), and any custom configuration you might need, like invalidating things on certain custom events.

iandunn commented 2 years ago

I tend to err on the side of don't touch it if it's working

Yeah, I think that's a good instinct in general.

What's the intention

The aren't any tangible problems at the moment, but in the past we've run into a few:

The simplicity of Surge is appealing as a way to minimize the chances of that stuff in the future, and to remove some of the customizations we've added with something that "just works".

It'd also give us caching for wp-json endpoints, and would be a devex improvement IMO.

There's always the chance that it could introduce new problems, though. The lack of preloading would probably be a performance hit, too. We could mitigate it to some extent w/ a longer TTL.

I think it'd be nice, but don't feel strongly.

dd32 commented 2 years ago

It'd also give us caching for wp-json endpoints, and would be a devex improvement IMO.

That alone would make it worth investigating IMHO. Especially given some current (and many future) things are likely built on top of it.

timiwahalahti commented 2 years ago

I always like simplifying things, so 👍 from me. Maybe we could roll Surge out in phases, starting tests with a small number of old WordCamp sites and gradually testing more with upcoming events before sunsetting WP Super Cache completely?

Let me know if there's anything I can help with these efforts :)

iandunn commented 1 year ago

If we do this we should also grep the code for DONOTCACHEPAGE and other things specific to WPSC, and do them in a more plugin-agnostic way (like nocache headers).