public function getMinExpireByTag($tag, $lifetime = 0)
    {
        $tags = (array) $tag;

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

        $now = new \DateTime();
        $expire = $this->getExpireTime($lifetime);

        try {
            $min = $this->_repository
                    ->createQueryBuilder('c')
                    ->select('MIN(c._expire)')
                    ->where('c._tag IN (:tags)')
                    ->andWhere('c._expire IS NOT NULL')
                    ->setParameters(array(
                        'tags' => $this->getContextualTags($tags), ))
                    ->getQuery()
                    ->execute(null, \Doctrine\ORM\Query::HYDRATE_SINGLE_SCALAR);

            if (null !== $min) {
                $min = new \DateTime($min);
                $lifetime = (null === $min) ? $lifetime : (null === $expire ? $min->getTimestamp() : min(array($expire->getTimestamp(), $min->getTimestamp()))) - $now->getTimestamp();
            }
        } catch (\Exception $e) {
            $this->log('warning', sprintf('Enable to get expire time for tags (%s) : %s', implode(',', $tags), $e->getMessage()));
        }

        return $lifetime;
    }