Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Background Info

I sell WordPress themes where I include a Twitter widget. In the widget I use a WordPress transient that refreshes every 3 hours to cache the Tweets. I've got thousands of people using this and it seems to work for just about everyone. Also, I've done little tests on my end to ensure I know the cache is working properly with how I have everything setup.

However, I've run into maybe 2 or 3 buyers where it's apparent that the cache is not working at all on their servers.

Note: I can tell because they keep getting timeout issues as they're hitting the Twitter API more than the allowed 150 times in an hour.


The Question

So, are there any reasons why someone's specific web server could have problems with WordPress transients? Or maybe something specific to someone's WordPress configuration? Is there anything else I could be overlooking?

share|improve this question

1 Answer

I had a similar problem once with an aggressive database cache: the first check for an existing transient returned nothing – which was okay – but after I created the transient, I didn’t get it, because the empty cached result was always returned. So I built a dozen duplicated transients until I found the issue.

Ask your clients if it happens after they disabled the data base cache. You could filter the 'query' and insert a SQL_NO_CACHE before you check the transient. Make sure to remove the filter afterwards.

share|improve this answer
I'm sorry, but I'm just not following this. What on someone's server would prevent WordPress's caching system from working? How would someone disable their database cache? Keep in mind that this would probably something inadvertent that the client has done. Most likely they're using some sort of hosting account that they've purchased and is already setup for them. I don't understand how WordPress transients work behind the scenes, but I'm just trying to figure out if it's possible some sort of sever or MySQL setting could be effecting this. – Jason Feb 27 '12 at 3:24
Install W3 Total cache, enable the query cache. This may be already the root of the problem. Another cause could be an aggressive MySQL cache. The regular WordPress cache doesn’t touch transients. – toscho Feb 27 '12 at 4:37

Your Answer

 
discard

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.