繁体   English   中英

如何在Quercus上使用Google App Engine的memcache?

[英]How can I use Google App Engine's memcache with Quercus?

http://blog.caucho.com/?p=196上 ,他们让Quercus使用PHP运行App Engine的数据存储区。 他们的来源是http://wordpress-on-quercus.appspot.com/wordpress-on-gae-quercus.zip

我想用他们的Google App Engine的memcache做类似的事情,最好是在PHP代码中,因为Quercus在PHP代码中允许使用“import”命令。

我解决了

<?php
import com.google.appengine.api.memcache.MemcacheService;
import com.google.appengine.api.memcache.MemcacheServiceFactory;

$service = MemcacheServiceFactory::getMemcacheService();
$service->put("key", "this is the value");
echo $service->get("key"); // outputs "this is the value"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM