[wp-hackers] $wpdb cacheing?

Rob Miller r at robm.me.uk
Mon Aug 20 14:45:31 GMT 2007


Stephen Rider wrote:
> On this page <http://codex.wordpress.org/Function_Reference/WP_Cache> 
> it says:
>
> "Caching is not enabled by default."
>
> So I'm confused as to why caching is happening anyways.  Unless that 
> sentence is incorrect in the Codex?
>
> Anyway, thanks for the help.  I may use raw SQL if I must (last 
> resort) but I'd much rather reference existing functions for future 
> compatibility.
>
> I think what I might try is to unset the wp_pages cache info, run the 
> new query, and then set it again.  If I can figure out how to cache 
> _my_ function's data, all the better!  :)
>
> Again, thanks Aaron and Jacob.
>
> Stephen
I think it's more likely to be that get_pages doesn't use $wpdb->prefix, 
it uses the actual table names ($wpdb->posts etc.).

Set those yourself (full list is in wp-settings.php) and try again.

Cheers,
Rob

-- 
Rob Miller
http://robm.me.uk/



More information about the wp-hackers mailing list