[wp-hackers] wpdb and caching
Haluk Karamete
halukkaramete at gmail.com
Mon Feb 4 21:07:30 UTC 2013
This is right from the wpdb codex (
http://codex.wordpress.org/Class_Reference/wpdb)
SELECT a Row
... If more than one row is returned by the query, only the specified
row is returned by the function, but all rows are cached for later
use. ....
My question is on the caching. Where is the cache kept? Are we talking
about a mysql server cache here? Or is there a transient like
implementation that I could not spot in the core?
The reason I found myself dealing with the cache matter is because
when I display the number of comments for the most popular posts, I'm
stuck with the old number of comments even though I programmatically
truncated the wp_comments and wp_commentsmeta, and there are
absolutely no records in those tables, but yet, I still see numbers
like 1,175 comments on display.
I do not have any caching plugins to blame. And the theme that I'm
using is using the plain old
comments_popup_link(__('No Comment','source'), __('1
Comment','source'), __('% Comments','source')); code.
What could be the reason of getting a display of old number of
comments on the display?
More information about the wp-hackers
mailing list