public function updateExpireByTag($tag, $lifetime = null, $bypass_control = false)
    {
        $tags = (array) $tag;

        if (0 == count($tags)) {
            return false;
        }

        $expire = $this->getExpireTime($lifetime, $bypass_control);

        try {
            $this->_repository
                    ->createQueryBuilder('c')
                    ->update()
                    ->set('c._expire', ':expire')
                    ->where('c._tag IN (:tags)')
                    ->setParameters(array(
                        'expire' => $expire,
                        'tags' => $this->getContextualTags($tags), ))
                    ->getQuery()
                    ->execute();
            $this->resetCacheEntity();
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to update cache for tags (%s) : %s', implode(',', $tags), $e->getMessage()));

            return false;
        }

        return true;
    }
public function updateExpireByTag($tag, $lifetime = null, $bypass_control = false)
    {
        $tags = (array) $tag;

        if (0 == count($tags)) {
            return false;
        }

        $expire = $this->getExpireTime($lifetime, $bypass_control);

        try {
            $this->_repository
                    ->createQueryBuilder('c')
                    ->update()
                    ->set('c._expire', ':expire')
                    ->where('c._tag IN (:tags)')
                    ->setParameters(array(
                        'expire' => $expire,
                        'tags' => $this->getContextualTags($tags), ))
                    ->getQuery()
                    ->execute();
            $this->resetCacheEntity();
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to update cache for tags (%s) : %s', implode(',', $tags), $e->getMessage()));

            return false;
        }

        return true;
    }
public function updateExpireByTag ( $ tag , $ lifetime = null , $ bypass_control = false ) { $ tags = ( array ) $ tag ; if ( 0 == count ( $ tags ) ) { return false ; } $ expire = $ this -> getExpireTime ( $ lifetime , $ bypass_control ) ; try { $ this -> _repository -> createQueryBuilder ( 'c' ) -> update ( ) -> set ( 'c._expire' , ':expire' ) -> where ( 'c._tag IN (:tags)' ) -> setParameters ( array ( 'expire' => $ expire , 'tags' => $ this -> getContextualTags ( $ tags ) , ) ) -> getQuery ( ) -> execute ( ) ; $ this -> resetCacheEntity ( ) ; } catch ( \ Exception $ e ) { $ this -> log ( 'warning' , sprintf ( 'Enable to update cache for tags (%s) : %s' , implode ( ',' , $ tags ) , $ e -> getMessage ( ) ) ) ; return false ; } return true ; }
Updates the expire date time for all cache records
associated to one of the provided tags.

@param string|array $tag
@param int          $lifetime Optional, the specific lifetime for this record
(by default null, infinite lifetime)

@return boolean TRUE if cache is removed FALSE otherwise
Updates the expire date time for all cache records associated to one of the provided tags .