【问题标题】:Persistent memcached connection with Apache and CodeIgniter与 Apache 和 CodeIgniter 的持久 memcached 连接
【发布时间】:2011-02-25 05:38:24
【问题描述】:

我有一个 CodeIgniter 项目。我想使用 Memcache,但我不想创建新的 每次加载index.php 时连接(在每次页面加载时)。如何设置 Apache / CodeIgniter 以便我始终可以访问 memcache 连接,而不必一直重新建立它?

【问题讨论】:

    标签: php apache codeigniter persistence memcached


    【解决方案1】:

    对不起,关于 php/apache 的问题是,它每次都会设置和拆除整个环境。除了 php/apache 环境(即文件、数据库或内存缓存)之外,没有应用程序级别的持久性。每次要使用它时都必须设置新连接。当然,PHP 以极快的速度弥补了这一点,这是 PHP 运行时开发人员选择做出的权衡。

    【讨论】:

      猜你喜欢
      • 2010-11-02
      • 2015-03-05
      • 2015-04-27
      • 1970-01-01
      • 1970-01-01
      • 2021-10-15
      • 1970-01-01
      • 1970-01-01
      • 2018-10-19
      相关资源
      最近更新 更多