The Transients API provides a standardized way to store data temporarily (with an expiration time) in the database.

learn more… | top users | synonyms

0
votes
1answer
157 views

Ajax call to transients

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 ...
1
vote
5answers
7k views

Will it break my site if I delete all transient records in wp_options table?

My site currently has an outrageous 500k+ transient records in the wp_options table. This causes the table to be crashed frequently and so be my site. I thought transient records will all expired ...
1
vote
1answer
119 views

Get the timout value of a saved transient?

Does anyone know if there is a Wordpress function to get the timeout value of a saved transient? I am using a transient with a 5 minute timeout to cache data from a web API call locally. Between ...
1
vote
1answer
268 views

How can I store an image in the database with Transients API?

I'm trying to store an image generated with imagecreatefrompng() using the Transients API, but it just stores an empty string (string(0) ""). Also, I notice if I set the transient before imagedestroy( ...
10
votes
5answers
936 views

When should I be using the Transients API?

I've never used the Transients API before and was wondering if anyone has guidance on when to use it. The Codex article implies that as a theme developer I might want to set each new WP_Query() as a ...
1
vote
2answers
355 views

WordPress Caching - Transients API or “update_user_meta ” Cronjob?

I'm trying to set user meta based on queries. Basically, things like IF the query returns true, set this or if not, set this (or don't set it, if it is true). This works great but the problem is I ...
4
votes
3answers
214 views

Fallback when Transient API fails

I'm trying to figure out how to best solve an issue I have with 3rd party API's (OG, Foursquare, Yelp, etc.). I use the transient API to call and store the various data in order to: Not exceed any ...
1
vote
1answer
55 views

Should I use the Transients API to temporarily hold edited attachements?

I'm building a store that allows users to order prints of photos. If the user orders a photo that has a different dimension than the one the photo is originally, they are prompted to crop the photo. ...
1
vote
3answers
373 views

Transients vs CRON +Custom Fields: Caching Data Per Post

Wanted some opinions on a solution I'm trying to come up with: I have a fan/enthusiast plugin I'm working on for fans of TV shows. One of the custom post types attached to the plugin is a release ...
5
votes
2answers
769 views

Using transients in conjunction with memcached

I was hoping someone could clear the air for me when it comes to using transients with memcached. When running a plugin like w3-total-cache, are there any actual performance advantages to using ...
2
votes
1answer
280 views

Storing an XML Response (Transient)?

Haven't worked much with XML so I'm hitting a bit of a wall: function getapi() { $api_response = wp_remote_get( "http://example.com/getXML" ); $data = wp_remote_retrieve_body( ...
1
vote
1answer
345 views

Transients API and multisite

we're using the Atlas HTML sitemap plugin, which caches the sitemap using the transients API with a call like: set_transient( 'dmac_html_sitemap', $output, 60*60*24*7 ); Now, we also have a ...
1
vote
1answer
413 views

Transient / object cache maximum key length [duplicate]

Possible Duplicate: Long option names fail silently? The WordPress Transients API makes it easy to save expensive values and look them up later. If you install an object backend (such as ...
0
votes
2answers
829 views

is_wp_error() and handling errors

Im trying to build a function which grabs the feedburner "readers" using wp_remote_get(). I noticed that it frequently returned a value of 0. I assumed at first that it was a WordPress error ...
3
votes
3answers
783 views

get_transient(), PHP switch(), and comparison operators

Im using a WordPress transient, which expires after an hour, to store a value which is an integer. Im trying to use switch() and multiple case() statements to evaluate if the transient exists or not ...
0
votes
1answer
218 views

Any insights into Transient API locking, cron and threading?

How does one go about locking down transient API requests for multiple threading? Has anything done some benchmarking, just how much can the transient API handle for multiple concurrent requests? It ...
0
votes
1answer
214 views

Compare transient data with a meta box value

So I'm not sure what would be the best way to go about this in terms of best practices and optimization. Scenario: I have query that parses an external XML feed and stores the data using the ...
4
votes
2answers
358 views

Does set_transient() overwrite/update transient option with same key?

Basically that's the question - I wonder if set_transient() overwrites/updates a transient option with the same key?
3
votes
2answers
1k views

wp-cron.php - How are WP's Cron transients removed?

I have a Wordpress Network that I am tasked with disabling the WP Cron and replacing it with an Apache Cron. I have set up a PHP script that when called by an Apache Cron will loop through all sites ...
34
votes
3answers
7k views

Are transients garbage collected?

This question got me thinking Transient RSS feeds in wp_options not removed automatically? Transients are supposed to expire and be deleted. However the only way I see this handled is when transient ...
2
votes
4answers
426 views

Long option names fail silently?

This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason. After much much pain and experimentation I ...