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

If I make an ajax call to a Wordpress transient, is the transient value taken from memory on the server or is a call to the database made?

I'm not using any caching plugins.

My application is fetching a tag list. The frontend will display matching tags as the user types. I'm assuming that all transients are loaded when the page loads. And therefore that the transient is fetched from memory when the ajax call is made. Yes?

share|improve this question
up vote 0 down vote accepted

Without object caching plugins transients are stored using options API and, if set to expire, they have auto-load disabled. Meaning:

  1. First request to transient needs to fetch it from database.
  2. Subsequent requests will get data from memory.

However note that "memory" here is memory space of single specific page load. It's not shared and not persistent.

Ajax request performs new network request to site, loads new instance of WP core and does the stuff. It's quite heave operation, which is hard to optimize and it's performance impact overall makes transient API overhead irrelevantly small.

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.