标签:
4. $version = $memcache->getVersion();
5. echo "Server‘s version: ".$version."<BR>\n";
6.
7. $tmp_object = new stdClass;
8. $tmp_object->str_attr = ‘test‘;
9. $tmp_object->int_attr = 123;
10.
11. $memcache->set(‘key‘, $tmp_object, false, 10) or die ("Failed to save data at the server");
12. echo "Store data in the cache (data will expire in 10 seconds)<BR>\n";
13.
14. $get_result = $memcache->get(‘key‘);
15. echo "Data from the cache:<BR>\n";
16.
17. var_dump($get_result);
标签:
原文地址:http://www.cnblogs.com/shenming/p/4202961.html