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 queries. I have now cached many fragments on the page, and (in my local environment) I get 294 queries in 0.764 seconds (calculated with get_num_queries() and timer_stop(0)). One snippet I’ve cached is … Read more

How to use cache with simplepie

According to the docs, if you want to cache results for a fetch of RSS feeds with simplepie, you do this: add_filter( ‘wp_feed_cache_transient_lifetime’ , ‘return_7200’ ); $feed = fetch_feed( $feed_url ); remove_filter( ‘wp_feed_cache_transient_lifetime’ , ‘return_7200’ ); My question is if I want to cache the results for several feed urls (by looping through an array), … Read more

Failing to open advanced-cache.php which is breaking Media Library

On my WordPress install, which is 3.8 and has all plugins updated, it is using Magic Fields 2 and Hypercache amongst other plugins. I can’t insert images into posts because when I upload, it gives me an error: An error occurred in the upload. Please try again later. The Media Library window from a post’s … Read more

Why my browser keeps loading old version of custom JavaScript files in \divi\js? [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for WordPress Development Stack Exchange. Closed 4 years ago. Improve this question I have custom JavaScript files in theme\divi\js. I modify these files and upload them to a GoDaddy web server, but the … Read more

How wp_cache is supposed to work, and does it help with performance?

I was coding my recent comments widget, and using $wpdb->get_results and I wanted t use cache so it doesn’t perform the query every time the page loads, so I used: $comments = wp_cache_get(‘mycomments’); if ($comments == false) { $query = //some sql stuff $comments = $wpdb->get_results($query); wp_cache_set(‘mycomments’, $comments); } //then use $comments and I used … Read more

wp_cache_set() or wp_cache_add()

That’s the question! There’s not much explanation on wp_cache_set() an even less for wp_cache_add(). What should I use in which circumstances? 1 Answer 1 According with WP Object API documentation both functions accepts these arguments: $key: the key to indicate the value. $data: the value you want to store. $group: (optional) this is a way … Read more

How can I improve site/page performance of WordPress websites?

To improve site/page performance, I added the following code to accept headers: <php flush(); ?> It works, but perhaps not as well as it could. Any advice? I also tried to leverage browser caching, using the following code: # Begin Expires Caching <IfModule mod_expires.c> ExpiresActive On ExpiresByType image/jpg “access 1 year” ExpiresByType image/jpeg “access 1 … Read more