<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, key, cache=None):
 """Query the server to delete the key specified from the cache specified. Keyword arguments: key -- the key the item is stored under. Required. cache -- the cache to delete the item from. Defaults to None, which uses self.name. If no name is set, raises a ValueError. """

        if cache is None:
            cache = self.name
        if cache is None:
            raise ValueError("Cache name must be set")
        cache = quote_plus(cache)
        key = quote_plus(key)

        self.client.delete("caches/%s/items/%s" % (cache, key))

        return True