search

Home  >  Q&A  >  body text

php framework - Zend Framework 1 clean cache not working?

I use the following statement to clear the cache:

        $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array($uid,'PERMISSIONS'));

There is no way to clear the cache at this time, I made sure the tags consisting of $uid and PERMISSIONS are correct. My cache save code is:

            $cache_tag=array($uid,'PERMISSIONS');
            $cache->save($cache_data,$cache_id,$cache_tag);

When I use the following method, it can be cleared

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

Why is this? ?

巴扎黑巴扎黑2794 days ago461

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-16 16:45:16

    Solved, the reason is that zf’s memcache cache does not support tag removal, see the source code

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-16 16:45:16

    reply
    0
  • Cancelreply