Confusion About WordPress Cache

From: Date: Fri, 17 Dec 2010 14:21:46 +0000
Subject: Confusion About WordPress Cache
Groups: php.general 
Request: Send a blank email to php-general+get-310099@lists.php.net to get a copy of this message
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

« previous php.general (#310099) next »