markjaquith / feedback

Ask @markjaquith anything!
42 stars 4 forks source link

Caching in WordPress #3

Closed ryanhellyer closed 10 years ago

ryanhellyer commented 10 years ago

Most people who I speak to, even those with lots of WordPress experience, don't seem to realise that WordPress has a caching layer built in. They may even know what transients are, but they have no idea that you can install a separate backend to handle it.

Most people seem to assume caching begins and ends with installing W3TC or WP Supercache or perhaps server-side stuff like Varnish.

How can we as a community (or project) improve this situation and make people more aware of how these work?

markjaquith commented 10 years ago

Two prongs: developers and users.

For users, I think that we need more hosting environments that are WordPress-aware and have an object cache pre-baked in. WP Engine, Pressable, Pagely all do this. We might also be able to detect the presence of some object caching backends in core and then suggest the user enable support. I actually wouldn't mind if some of the popular backends like APC and Memcache were built in to core and could be enabled with a wp-config.php constant. We could do tests on install and write the right value to the config, or prompt the user later to add it.

For developers, I think it would be good to "tag" functions in WordPress that are expensive and could benefit from caching when used in plugins and themes. And we should encourage developers to performance test their plugins. Projects like VVV include XDebug and the ability to do performance profiling.