Articles of caching

How do I force WP_query to fetch fresh, non-cached results?

Context: In a social sharing plugin that I work on, I’m store social share counts in hidden post meta (custom fields) so that I can use that data for various functions around the plugin. One useful use of this data is to create a Popular Posts widget that is based on the number of social […]

Any reason why wp_cache_set not to work?

Any reason why wp_cache_set not to work? I have spun my wheels trying to figure out why these are not working. Any suggestions? These functions are supposed to help me cache the results to a key/object and then leverage the key/object to display the info. However, they are not storing key/object $related_post_ids = wp_cache_get( ‘related_post_ids’ […]

Why does my site flash white every time it changes page?

Any ideas? I’ve never had this problem before. Here is the site.

customize wordpress database error page

UPDATE Initially I suspected this was related to the WordPress framework I’m using (Genesis) or to my child theme functionality, but turns out that’s not the case as I was able to get this to work in a test environment running on the same framework and child theme. Possibly this is related to the caching […]

WooCommerce & Caching

I have a div that displays the total amount of products the customer has in their cart, however this isn’t updating as I have caching on (W3 Total Cache). Is there a workaround for this? Cheers, Steve

Where to put W3 Total Cache rewrite rules in .htaccess?

Should I put them in the following order or the order doesn’t matter at all? # BEGIN W3TC Browser Cache # END W3TC Browser Cache # BEGIN W3TC Page Cache core # END W3TC Page Cache core # WordPress default rewrite rules

Take control of WordPress before functions.php

I’m developing theme and I want to make page cache of static pages in my WordPress theme (and basically I know how to implement it) The problem is that when making theme – the first time when I “get any control” about what is happening is inside functions.php file of theme, and this file is […]

Enabling Cache on WP Membership Sites. Good OR Bad?

I develop wordpress membership sites and I never enable any caching plugin on those sites. I presume, if I enable caching then members might have some issues due to cache or there might be an issue during checkout process. I have never tried this though: The membership plugins I use are: Wishlist Members, Digital Access […]

Disable WordPress cache programmatically on a request

How do I turn off the WP Super Cache & W3 Total Cache functionality programmatically? For instance, I neither want to make it use the cache on some requests nor cache the output of the request, do they support that using filters? I couldn’t find anything useful in their documentation.

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 with paging. So far, I am showing 12 posts per page. When I load the next set […]