WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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