Re: Confusion About WordPress Cache

From: Date: Fri, 17 Dec 2010 14:32:02 +0000
Subject: Re: Confusion About WordPress Cache
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-310101@lists.php.net to get a copy of this message
On Dec 17, 2010, at 8:21 AM, 肖晗 wrote: > I am using WordPress Cache to cache data retrieved from database, using > WP_Cache > <http://codex.wordpress.org/Function_Reference/WP_Cache>. > > After I used wp_cache_set to set some data in the cache, I try to get it by > wp_cache_get in ANOTHER post request. > > However, it failed to retrieve the data I have previously saved. > > It is ok if I try to retrieve the data in just one request(place the *set*and > *get * in the same script). *However, in separate * > * > * > *requests, I doesn't work.* > > I wonder if I got the wrong idea of what *cache* is. I have it in mind that > *cache *can be preserved even in different requests > > from the same user.*Then the cache has nothing different with a variable, I > think!!* > > And I am doubting my idea now! > > Can anyone help? Or it is not what I am thinking. *Is there any way to > retrieve the same data which has been saved * > * > * > *before(not using database) in separate requests? * > > > Really thanks for any response! > > Best regards! > > Xiaohan I am not by any means saying that everyone here does not know the answer. Correct me if I am wrong, but this seems like a bit more of a specifically WP question than a PHP question, and you may get a better response from one of the WP mailing lists. http://codex.wordpress.org/Mailing_Lists

« previous php.general (#310101) next »