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
2answers
49 views

Looping through posts per category gives same posts for each category

For a specific section on my website I loop through some categories and get the three latest posts in that categorie and list them. Like so: <?php $categories = get_categories(array('exclude' ...
0
votes
1answer
52 views

Web scraping using transients

I'm using xPath to scrape tour dates from another website (with permission of course). Since it updates on every page load, I thought about using transients to store the data. Unfortunately I have no ...
0
votes
1answer
24 views

Workflow for new importer plugin - your advices?

I'm building a new plugin to import Pinterest Pins from a user into Wordpress. It will NOT work using the Pinterest API (which is too limited for what I want to do) and requires the user login and ...
0
votes
1answer
17 views

Set Transient on CPT

When I add set_transient code to my cpt query, I get a Fatal error: Call to a member function have_posts() on string ... on line 30 Line 30 is basically: if($graduate_student_query->have_posts()) ...
4
votes
1answer
134 views

Fragment caching increasing database queries

While implementing fragment caching on a wordpress site by using the technique described here: http://css-tricks.com/wordpress-fragment-caching-revisited/ I found that it seems to actually increase ...
2
votes
1answer
45 views

How to use transients and variables

I am trying to implement transient fragments, I've been doing what is suggested here: http://css-tricks.com/wordpress-fragment-caching-revisited/ While it is working for headers, footers, landing ...
1
vote
0answers
35 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
1answer
73 views

How to delete transients written by fetch_feed()?

I'm using fetch_feed() to cache external rss sources displayed in a widget. in case the widget (or, more likely, the whole plugin) is deleted/deactivated, i want to manually delete all related ...
0
votes
2answers
56 views

What is the best way (regarding performance) to set transients for logged in users?

I have an option for my logged in users where they can hide the posts they dont want to see. Everything works as expected until I implement transients. When I set the transients to cache the posts ...
0
votes
0answers
27 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
1answer
29 views

How to make use of Transient API as cookie

I want to use Transient API as cookie, but I want to know if it is the best practice,and how to make transient be unique or per user. Thanks
1
vote
1answer
84 views

Messing up with transient API - getting flushed on refresh

Following the _s theme I wanted to make my own version of Post Categories List with Transient, and here's what I made: function my_blog_categories() { global $post; if ( ( ...
1
vote
2answers
200 views

Transient not working for custom loops

I'm working at a WordPress theme. Since I need to display featured posts, related posts, some widgets with recent posts and so on, I need to use multiple custom loops. Because of this, the number of ...
0
votes
0answers
65 views

How to get transient cache to work with wp_enqueue_script

So I have this page that has various shortcodes on it. Each shortcode may have wp_enqueue_script to load say jQuery accordion or tabs. Now I am wanted to cache the page for better performance so I ...
0
votes
1answer
97 views

Storing temporary data for a custom post type

I've created a Rental custom post type to a rental site I'm developing for a client. I'd like to add an ajax availability calendar in the backend so the client can mark/unmark unavailable dates ...
4
votes
1answer
150 views

Storing posts social counters by using transient api

I would like to know if it's a good practice to use transient api to cache social counters for every post. Loading post pages get quite slow while processing and getting all social APIs.
0
votes
0answers
46 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 ...
-1
votes
1answer
219 views

How to cache wp_query with pagination using transients?

I have seen examples where there is a fix number of posts to be queried; however, I cant find an example when using pagination. I am trying to figure out how to use transients to cache a WP_Query ...
1
vote
1answer
165 views

How to delete a transient on post/page publish?

I have a transient set for a custom query. It expires in 30 days. But I also need it to expire once a new post/page is published. So that the new published post/page is available in that custom query. ...
0
votes
1answer
492 views

pre_set_site_transient_update_plugins wont call on hosted webspace

Iam trying to use "pre_set_site_transient_update_plugins" to update my plugin from a GitHub repository. For that Iam using this example https://github.com/bfintal/Plugin-Update. On my Dev-System ...
0
votes
0answers
34 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 ...
0
votes
0answers
50 views

Sitewide Tags and Transient API

I'm running a couple of multisite networks and am using a useful plugin called WordPress MU Sitewide Tags Pages. I like the plugin very much but I am concerned about performance, especially as my ...
0
votes
1answer
35 views

How to optimize performance without transient?

I've built a widget to output some fancy content from an API. I realize today I added a transient system so everytime the widget is updated transient is deleted and everything is alright. What I ...
1
vote
0answers
34 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 ...
0
votes
1answer
65 views

Whats wrong with this transient? Not caching as expected

I am trying to cache the returned data from a query using WP_Query. It doesn't seem to be storing any where near the time I have specified. Sometimes its refreshing on every page load. What might I ...
1
vote
1answer
73 views

Minimize database queries to user tables?

I'm trying to come up with a strategic way to collect large amounts of usermeta data (and output to the screen) while keeping database queries low. Some pages, like the home page, single pages, and ...
0
votes
2answers
188 views

Set Transient expiration

I have a page that displays a random post every day. In order to change post every 24 hours I use set_transient('totd_trans_post_id', $totd[0]->ID, (60*60*24)); What I'm wondering is this: ...
1
vote
2answers
77 views

Transient API and caching Plugins

Hello wordpress NINJAS.... I am crazy about transient api and I have implemented it in my theme.My question is If I use transient api is it required caching plugin? (I hate plugins!!!) If I use ...
0
votes
1answer
213 views

Why does get_transient() always return string even if integer set?

I've been trying to bug fix the following method for hours now, and don't have an idea why it always returns a string, instead of an integer. The idea is to return a class property, if exists, or a ...
0
votes
1answer
60 views

I am officially missing something about transient posts

I have no issue creating transients. What I have an issue with is pagination - and I have made posts on it before and every one sates that the query must look like, for example: $queried_post ...
1
vote
0answers
101 views

Transients and WP Super Cache? [closed]

Is it worth using Transients when running WP Super Cache? We have a website that get's updated 20 times a day with new post, so I set a lot transients for queries that don't reflect those updates. My ...
2
votes
1answer
374 views

Transient caching for wp query

I read about transient in the codex and some questions and answers here. So i'm developing a web app based on wp. It works now, but i want to optimize it. Users manage content regulary, so crud ...
0
votes
2answers
166 views

Set transient with get posts error

I have a big WordPress installation more than 200K posts, with auto publish posts features. My post content is contained "some HTML tags, some text, some <img> tags". I need to remove all ...
1
vote
1answer
130 views

Transient pagination not working properly

So I wrote the following to create a transient: $wp_object_i_created = new WP_Query('cat=1'); set_transient('category_one_posts', $wp_object_i_created, 60*60*1); Ok so then I decided "Ya know lets ...
2
votes
1answer
180 views

Integrating WP-TLC-Transients with Wordpress - Where to Begin?

Last week, I asked about creating transients that would update before expiry to prevent users from waiting for the long loading time. I was pointed to WP-TLC-Transients which sound like exactly what ...
1
vote
1answer
81 views

How to cache posts based on $_GET? Option name is too long? Options / transients

I have a search feature set up that is fairly expensive and I want to cache the results, based on the $_get string, like: ...
2
votes
1answer
55 views

Is priming a Transient Cache possible?

I'm currently using Wordpress Transient Caching when querying images I've uploaded and tagged. Using Transient Caching has really sped up these queries once they are cached, but unfortunately, once ...
0
votes
2answers
125 views

Transient Loop Not working as expected

So I created a transient object that used get_posts() to get a series of posts based on some argument. Well the transient was stored - it was created - YAY - now I tried to write this loop: public ...
3
votes
2answers
538 views

Best practices for using the transients API

I've recently come across the Transients API in Wordpress in hopes of improving the performance of the plugin that I'm trying to write. Basically the plugin is storing product details from the amazon ...
0
votes
1answer
143 views

WP_Cron doesn't do the job: Multisite stats

I already found out how to get the amount of networkwide posts in WPMS. Until now the function was called by a user who opens the website. So it was rebuild every 24 hours. I don't want to let a ...
5
votes
2answers
280 views

Are transients private or public?

Are WP transients specific to the user-session or can they be accessed from any session anywhere? Since they are written to the DB, I would imagine they are public and accessible everywhere, but is ...
0
votes
1answer
270 views

Clear Transients

I have build a custom theme for a client of mine, and I am using transients in order to make the site operating faster. After a week, I have see in the wp_options a huge list of transients records ...
2
votes
4answers
670 views

Get a list of existing transients

I have been using transients a lot in WordPress since I discovered them, however to ensure my sites update properly when a post is edited or created I added a function to delete transients on post ...
0
votes
2answers
192 views

How to purge all transient caches?

Is there an easy way to delete all transient caches? A plugin maybe? Or like in drupal "drush cc all"?
1
vote
1answer
62 views

Transient unique names

What would be the correct way to assign a different name to each transient for each instance of a plugin used as a widget or shortcode?
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. ...
2
votes
2answers
474 views

How to delete cached transients from a widget instance properly?

So I have created this widget which pulls a number of posts. And the query is being cached via transients. But I need the transient to be deleted whenever a post is saved so the query can be ...
2
votes
1answer
217 views

Should the caching of WordPress menus be specific to each page?

Introduction In optimizing large WordPress Websites for performance I always look at caching certain parts of the Website, mostly (of course) those that require a lot of Queries/calculation. For the ...
0
votes
1answer
153 views

Unique Transients user id for Non-Logged In users

I am coding a plugin and it seems wordpress discourage use of Sessions. I have a kind of wizard for non-logged in users that asks for First Name, Last Name etc and some conditional questions from ...
0
votes
3answers
421 views

passing markup thought a shortcode attribute

Happy holidays everyone. Hope someone can help me in thinking about a problem I've run into. I have a plugin Im building that allows the user to pull address data from the maps API - ie it ...