• <i id='54uwP'><tr id='54uwP'><dt id='54uwP'><q id='54uwP'><span id='54uwP'><b id='54uwP'><form id='54uwP'><ins id='54uwP'></ins><ul id='54uwP'></ul><sub id='54uwP'></sub></form><legend id='54uwP'></legend><bdo id='54uwP'><pre id='54uwP'><center id='54uwP'></center></pre></bdo></b><th id='54uwP'></th></span></q></dt></tr></i><div id='54uwP'><tfoot id='54uwP'></tfoot><dl id='54uwP'><fieldset id='54uwP'></fieldset></dl></div>
        <bdo id='54uwP'></bdo><ul id='54uwP'></ul>
      <legend id='54uwP'><style id='54uwP'><dir id='54uwP'><q id='54uwP'></q></dir></style></legend>
      <tfoot id='54uwP'></tfoot>

      1. <small id='54uwP'></small><noframes id='54uwP'>

        如何将 ZendOpCache 用于 Doctrine2 缓存?

        How to use ZendOpCache for Doctrine2 cache?(如何将 ZendOpCache 用于 Doctrine2 缓存?)

        • <tfoot id='jq20Q'></tfoot>
              <bdo id='jq20Q'></bdo><ul id='jq20Q'></ul>
                  <tbody id='jq20Q'></tbody>

              1. <i id='jq20Q'><tr id='jq20Q'><dt id='jq20Q'><q id='jq20Q'><span id='jq20Q'><b id='jq20Q'><form id='jq20Q'><ins id='jq20Q'></ins><ul id='jq20Q'></ul><sub id='jq20Q'></sub></form><legend id='jq20Q'></legend><bdo id='jq20Q'><pre id='jq20Q'><center id='jq20Q'></center></pre></bdo></b><th id='jq20Q'></th></span></q></dt></tr></i><div id='jq20Q'><tfoot id='jq20Q'></tfoot><dl id='jq20Q'><fieldset id='jq20Q'></fieldset></dl></div>

                <small id='jq20Q'></small><noframes id='jq20Q'>

              2. <legend id='jq20Q'><style id='jq20Q'><dir id='jq20Q'><q id='jq20Q'></q></dir></style></legend>

                  本文介绍了如何将 ZendOpCache 用于 Doctrine2 缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我已经在我的开发环境中安装了 PHP 5.5.1,并且还配置了 Zend OpCache 作为缓存提供者.一切都在使用新版本和设置的服务器上运行,但在我的 symfony 2 项目中,我有 Doctine2 缓存来存储一些静态"数据(国家、语言等),但它不适用于 Opcache.

                  I have installed PHP 5.5.1 in my development environment, and also have config Zend OpCache as Cache provider. Everything is working on the server with the new version and settings, but inside my symfony 2 project I have the Doctine2 cache to store some "static" data (countries, languages, etc) and it not works with Opcache.

                  直到今天,我还在使用 DoctrineCommonCacheApcCache 使用 APC 处理 Doctrine2 缓存的类,但似乎不存在使用 OpCache 的类.

                  Until today, I was using the DoctrineCommonCacheApcCache class to work with the cache of Doctrine2 using APC, but seems that does not exists a class to work with OpCache.

                  这是我的 APC 缓存的 config.yml:

                  This is my config.yml for APC cache:

                  # Services
                  services:
                      cache:
                          class: DoctrineCommonCacheApcCache
                  

                  现在,使用 OpCache 我尝试使用 ZendDataCache 来处理缓存系统,但不起作用:

                  Now, with OpCache I have tried to use ZendDataCache to deal with cache system, but does not work:

                  # Services
                  services:
                      cache:
                          class: DoctrineCommonCacheendDataCache
                  

                  我收到此错误,因此我假设 ZendDataCache 类不适用于 OpCache:

                  I get this error, so I assume that ZendDataCache class is not for OpCache:

                  FatalErrorException: Error: Call to undefined function DoctrineCommonCachezend_shm_cache_fetch() in/var/www/meediam/src/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php line 38

                  FatalErrorException: Error: Call to undefined function DoctrineCommonCachezend_shm_cache_fetch() in /var/www/meediam/src/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php line 38

                  最后我配置了 ArrayCache,它可以工作,但没有缓存系统落后.

                  Finally I have configured the ArrayCache, and it works, but without cache system behind.

                  所以问题是,有人知道如何将 Zend OpCache 与 Doctrine 2 Cache 结合使用吗?

                  PS:我使用的是 Symfony 2.3.2

                  推荐答案

                  添加我的评论作为答案.

                  PHP 的 OpCache 不像 APC 那样是一个完整的缓存,它只是一个简单的操作码缓存.如果您想像使用旧 APC 一样存储自定义数据,您可以使用 Joe Watkins' APCu:https://github.com/krakjoe/apcu.

                  PHP's OpCache is not a full blown cache as APC It is a simply opcode cache. If you want to store custom data just like you would with the old APC you can use Joe Watkins' APCu: https://github.com/krakjoe/apcu.

                  还有 yac 和 memcache.

                  There is also yac and memcache.

                  这篇关于如何将 ZendOpCache 用于 Doctrine2 缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    • <tfoot id='G5uL6'></tfoot>
                    • <legend id='G5uL6'><style id='G5uL6'><dir id='G5uL6'><q id='G5uL6'></q></dir></style></legend>
                    • <i id='G5uL6'><tr id='G5uL6'><dt id='G5uL6'><q id='G5uL6'><span id='G5uL6'><b id='G5uL6'><form id='G5uL6'><ins id='G5uL6'></ins><ul id='G5uL6'></ul><sub id='G5uL6'></sub></form><legend id='G5uL6'></legend><bdo id='G5uL6'><pre id='G5uL6'><center id='G5uL6'></center></pre></bdo></b><th id='G5uL6'></th></span></q></dt></tr></i><div id='G5uL6'><tfoot id='G5uL6'></tfoot><dl id='G5uL6'><fieldset id='G5uL6'></fieldset></dl></div>
                        <bdo id='G5uL6'></bdo><ul id='G5uL6'></ul>

                        <small id='G5uL6'></small><noframes id='G5uL6'>

                            <tbody id='G5uL6'></tbody>