コード例 #1
0
 /**
  * Return an array of stored cache ids which match any given tags
  *
  * In case of multiple tags, a logical OR is made between tags
  *
  * @param array $tags array of tags
  * @return array array of any matching cache ids (string)
  */
 public function getIdsMatchingAnyTags($tags = array())
 {
     $ids = array();
     if (!empty($tags)) {
         $tags = $this->_preprocessTagIds($tags);
         //  $this->_redis->sUnion
         foreach ($tags as $oneTag) {
             $ids = array_merge($ids, $this->_preprocessIds($this->_redis->smembers($oneTag)));
         }
     }
     return $ids;
 }