Menu

Cache

caching patterns WordPress

Caching complex queries

At a certain point of our WordPress learning path we need to learn the art of caching. Here I’m presenting some cache patterns that I use when developing in WordPress. Welcome to the first post on the Patterns series.

Cache and Options API

One of the simplest and powerful WordPress APIs is the so called Options API. It allows one to store data in the database easily, in a standardised way. One of the most used functions within this API is the get_option( $option_name ) which retrieves the value stored in DB. For one of my last projects I