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

<legend id='nmi5b'><style id='nmi5b'><dir id='nmi5b'><q id='nmi5b'></q></dir></style></legend>
<tfoot id='nmi5b'></tfoot>
    • <bdo id='nmi5b'></bdo><ul id='nmi5b'></ul>

      1. <i id='nmi5b'><tr id='nmi5b'><dt id='nmi5b'><q id='nmi5b'><span id='nmi5b'><b id='nmi5b'><form id='nmi5b'><ins id='nmi5b'></ins><ul id='nmi5b'></ul><sub id='nmi5b'></sub></form><legend id='nmi5b'></legend><bdo id='nmi5b'><pre id='nmi5b'><center id='nmi5b'></center></pre></bdo></b><th id='nmi5b'></th></span></q></dt></tr></i><div id='nmi5b'><tfoot id='nmi5b'></tfoot><dl id='nmi5b'><fieldset id='nmi5b'></fieldset></dl></div>
      2. Zend 框架清除缓存

        时间:2023-05-29

        <small id='7LmVp'></small><noframes id='7LmVp'>

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

                  本文介绍了Zend 框架清除缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用此代码在 zend 框架中缓存数组:

                  I'm using this code to cache an array in zend framework :

                  $frontendOptions = array(
                      'lifetime' => 24 * 3600 * 7, // cache lifetime of 7 day
                      'automatic_serialization' => true
                  );
                  
                  $backendOptions = array(
                      // Directory where to put the cache files
                      'cache_dir' => APPLICATION_PATH .'/../tmp'
                  );
                  
                  // getting a Zend_Cache_Core object
                  $cache = Zend_Cache::factory('Core',
                      'File',
                      $frontendOptions,
                      $backendOptions);
                  
                  $CacheName = ('VOUCHER_MANAGEMENT');
                  
                  $CacheResult = $cache->load($CacheName);
                  
                  if($CacheResult === false)
                      //make cache
                  else 
                      //use cache
                  

                  现在如何手动清除缓存?

                  Now how can I clear the cache manually?

                  推荐答案

                  根据文档 一次调用 remove() 方法就足够了,即删除特定的缓存项:

                  According to the documentation a single call of the remove() method would suffice, i.e. to remove a specific cache item:

                  $cache->remove($CacheName);
                  

                  如果要清理过时的缓存项,则调用clean()方法:

                  If you want to clean the outdated cache items, then call the clean() method:

                  $cache->clean(Zend_Cache::CLEANING_MODE_OLD);
                  

                  要删除缓存中的所有项目:

                  To remove all items in the cache:

                  $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
                  

                  这篇关于Zend 框架清除缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:此适配器需要 PDO 扩展,但未加载扩展 下一篇:我应该如何在 ACL 中构建我的资源树?

                  相关文章

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

                  2. <small id='XPL6g'></small><noframes id='XPL6g'>

                      • <bdo id='XPL6g'></bdo><ul id='XPL6g'></ul>