public function addType($type)
    {
        if (!in_array($type, $this->validTypes())) {
            throw new InvalidArgumentException(
                sprintf('Invalid cache type: "%s"', $type)
            );
        }

        $this->types[$type] = true;
        return $this;
    }