[wp-hackers] Questions about the Cache
mark at phunky.co.uk
Wed Jul 19 11:36:15 GMT 2006
Arrr right i do kinda get what your saying now, i just thought it would
be possible to just add to the $wp_object_cache->cache[users] that
already gets set but i guess this is not stored?
I shall have a play with what you have suggested, it seems like a very
simple way of doing it anyway.
Mark 'Phunky' Harwood
Founder of mEm-Gaming.co.uk
> Er, whoops, didn't read the rest of your e-mail and hit submit by
> To do what you want, I suggest querying them all and then storing them
> as an option in the database. When you fetch the option value (the
> data), it'll be pulled from the cache.
> Check out one of my plugins for an example:
> It does basically exactly the kinda thing you're doing. Without
> caching, it does ~300 queries. With the caching of the output to one
> option, it cuts it down to just 2 or 3 and then with WordPress'
> caching on, it cuts it down to just one I believe. :)
> Mark Harwood wrote:
>> Hey guys, im trying to make some of my basic WordPress functions a
>> bit more cache friendly, but i have a feeling that because my dev
>> server is on a Windows box its having a bit of trouble working properly.
>> Can someone explain how the cahce works? i can push the data needed
>> into the $wp_object_cache Object with ease, but it does not seem to
>> keep it there.
>> I cant seem to figure out how to actualy save settings to the cache
>> for the full expire limit, it just seems to be in $wp_object_cache
>> for the time you init the page load.
>> I basicly wish to cash the full list of users on my website as i use
>> ther data alot and dont want to have to call MySQL everytime.
>> See: http://www.mem-gaming.co.uk/v2/index.php/profiles/
>> It takes ages to load the page and i think its down to the way i pull
>> out the userdata as a whole.
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers