0

I have create a web site with a lot of traffic, and I have use the WordPress transients in order to "cache" the requested data. Until here all are fine with my custom made queries and usage of WP_Query.

The question that I have, is how can I "cache" the data return by the WordPress "Loop" in categories?

In categories theme file I am using the default loop code, in order to print the data, but I don't have access on the WP_Query results for this theme file.

So, Is there a way to cache the data provided by the WordPress in Categories ?

KodeFor.Me
  • 13,069
  • 27
  • 98
  • 166

1 Answers1

1

The advice from the Wordpress documentation is to install a Persistent caching plugin

phil
  • 1,940
  • 1
  • 13
  • 13
  • I know that, but this is not what I need this time. I only need to cache the data as it is. – KodeFor.Me Jul 18 '13 at 07:08
  • Ok, the link I posted should still help though: http://codex.wordpress.org/Class_Reference/WP_Object_Cache `$result = wp_cache_get( 'my_result' ); if ( false === $result ) { $result = $wpdb->get_results( $query ); wp_cache_set( 'my_result', $result ); } // Do something with $result;` – phil Jul 18 '13 at 07:17