【问题标题】:How can I use Google App Engine's memcache with Quercus?如何将 Google App Engine 内存缓存与 Quercus 一起使用?
【发布时间】:2011-02-13 02:03:07
【问题描述】:

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

我想对他们的 Google App Engine 的内存缓存做类似的事情,最好全部在 PHP 代码中,因为 Quercus 在 PHP 代码中允许“导入”命令。

【问题讨论】:

    标签: java php google-app-engine memcached quercus


    【解决方案1】:

    我解决了。

    <?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"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-06-23
      • 1970-01-01
      • 2013-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多