Lesser-known WordPress features
Throughout this book, we have looked at the major components related to web application development. WordPress also offers some additional features that are rarely noticed by the developers' community. Let's get a brief introduction on the following lesser known features of WordPress:
Caching
Transients
Testing
Security
Caching
In complex web applications, performance becomes a critical task. There are various ways of improving the performance from the application level as well as the database level. Caching is one of the major features of the performance-improving process, where you keep the results of complex logic or larger files in the memory or database for quick retrievals. WordPress offers a set of functions for managing caching within applications. Caching is provided through a class named WP_Object_Cache
, which can be used effectively to manage nonpersistent cache.
We can cache the data using the built-in wp_cache_add
function as defined in the following...