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

learn more… | top users | synonyms

1
vote
1answer
46 views

What causes a transient to changes status to “Does Not Expire”?

I noticed that some transients on my site every now and then go from having an expiration date to "Does Not Expire". I have noticed this happening with some plugins (eg Gravity Forms) but also ...
1
vote
1answer
56 views

Hook an action when a transient is deleted ? Can't get it to work!

I'm working on a plugin, and it caches a remote page when requested. The file is created with tempnam(). I save the path of that cached file in a transient, using the transient API. Once the ...
1
vote
1answer
43 views

Transients API conditional

I have the following transient, but if the user changes the value of $url the transient should not be used. I want to know what is the most appropriate way to use this variable with the transient. ...
0
votes
1answer
96 views

Is there a better way to access transients using javascript

I've been searching around the web trying to find a better way to use wordpress transients with javascript. Currently I am using admin-ajax to run a php function that retrieves the transient and ...
0
votes
1answer
98 views

Should I store external API data in my WP database or keep it as a transient?

I am in a situation where I need to use data from an API (XML) served by a third party in my WordPress site. The data will be updated on that third party application. Specifically this is data about ...
0
votes
1answer
67 views

Hacked site using transient API?

I have got a website to "cleanup" which has almost 10k replicated files in the public_html folder and almost all PHP files contains code ...
0
votes
1answer
50 views

Delete Transient when clicking 'Save Changes' on options page

I have an options page setup for a ticker tape on a theme I am working on. It has a number of options such as Title, number of posts to display and what categories to display posts from. I have also ...
0
votes
1answer
952 views

pre_set_site_transient_update_plugins wont call on hosted webspace

I am trying to use pre_set_site_transient_update_plugins to update my plugin from a GitHub repository. For that I am using this example. On my Dev-System (MAMP for Mac Version 2.2) everything is ...
-3
votes
1answer
51 views

Why can't I save encrypted data in a transient?

I'm trying to save encrypted data (using AES-256-CBC in PHP) in a transient but for some reason it keeps failing. The transient key is under the required length of 45 characters and the data is not a ...
1
vote
0answers
118 views

Transient storage location? database/xcache/w3Total Cache?

I've been working to speed up my site by utilizing transients to store rendered HTML and it works great. I've set up checks that clear specific transients upon post/page/data updates and it all works ...
1
vote
0answers
48 views

wp_options flooded with transient API entires

I make heavy use of the WordPress Transient API. Suddenly a few days ago my wp_options table began being flooded with transient entries (2GB worth on average). Normally WordPress only writes them to ...
1
vote
0answers
231 views

After having installed APC Object Cache Backend transients stopped working

My understanding is that once you enable the persistent object cache, your transients are no longer stored in wp_options but in the cache. Once I installed Mark Jaquith's APC Object Cache Backend, ...
0
votes
0answers
19 views

WooCommerce Shipping

I have a WordPress site using WooCommerce with bespoke shipping functionality on. All it does is find the users shipping address and works out the distance between the customer and the depot, based on ...
0
votes
0answers
58 views

WordPress database error Deadlock found

My website become slow due to this issue. WordPress database error Deadlock found when trying to get lock; try restarting transaction for query DELETE FROM wp_options WHERE option_name LIKE ...
0
votes
0answers
34 views

Test if fragment caching is working

I had this fragment caching function added in the `function.php. it goes like this: function fragment_cache($key, $ttl, $function) { if ( is_user_logged_in() ) { ...
0
votes
0answers
18 views

Add Hook for clearing transient when post is added

I have this fragment caching implemented in a page. I've got the codes from https://css-tricks.com/wordpress-fragment-caching-revisited/. Which goes like this: function fragment_cache($key, ...
0
votes
0answers
48 views

WP_cron not updating post meta, instead clearing it

I'm trying to store social media follower count (ex. FB fans, Twitter followers) in post meta daily with wp_cron. If I manually save the post it will save the social media count numbers correctly in ...
0
votes
0answers
158 views

Notice: Undefined property: stdClass and WordPress transients

I took this for a basis https://github.com/abeMedia/shareCount and created a class for retrieving social share counts to use in a theme. I also implemented WordPress's built-in transients for cashing. ...
0
votes
0answers
69 views

How to decode wordpress transient cache stored in database?

Wordpress stores caches using Transient and saved in wp_options table. I can't read those stored values - a sample snapshot is as below. If you know how to decode/read/parse them, please share.
0
votes
0answers
57 views

What is the best way to upload a temporary & sensitive file and then delete it when done

What is the best way to upload a temporary & sensitive file and then delete it when done. I'm writing a plugin (eventually for multisite) that allows users with a certain role to upload a .csv ...
0
votes
0answers
99 views

Show the online status of the current post's author

Is there a way that I can show the online status (Either online or offline) of the author of the post that a site visitor is viewing? I imagine it's something to do with the Transients API ...
0
votes
0answers
45 views

Should I use transients for these API call results?

I am consuming an API that gives me a list of people and their profiles. My initial idea was working perfectly fine when it's just the list of people because I was just saving the ids and names using ...