[wp-hackers] Two loops on one page?

Owen Winkler ringmaster at midnightcircus.com
Tue Nov 9 22:16:58 UTC 2004


Ryan Boren wrote:
> update_post_caches() needs to be fixed.  It would be nice if it merged
> each run cleanly into the category cache rather than obliterating the
> previous cache.  Anyone wanna fix it?

Maybe...

Intuition says that there must be more to it, but this small change is 
working for me.

I wonder, though, in what case would the cache be incomplete that it 
would need to merge like this?  It seems as though if a category cache 
exists for a specific post ID at all, that it would be implicitly 
complete.  If so, then a better solution would check whether the cache 
exists and then not suffer the database hit if it doesn't have to.

Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: functions.php.diff
Type: text/x-patch
Size: 544 bytes
Desc: not available
Url : /pipermail/hackers_wordpress.org/attachments/20041109/9da5c4df/functions.php-0001.bin


More information about the hackers mailing list