I'm in the process of making my own widget but I don't like it to fully generate the content each time since the process is quite lenghty. I can easily create my own caching mechanism but I'm wondering if there is something that already exists in the wordpress core when it come to caching widgets.


Thanks! Dennis

1 Answer 1


take a look at WordPress Transients API

which offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted.

The transients API is very similar to the Options API but with the added feature of an expiration time, which simplifies the process of using the wp_options database table to store cached information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.