'Read a cached tile.'

def read(self, layer, coord, format):

    fullpath = self._fullpath(layer, coord, format)
    if (not exists(fullpath)):
        return None
    age = (time.time() - os.stat(fullpath).st_mtime)
    if (layer.cache_lifespan and (age > layer.cache_lifespan)):
        return None
    elif self._is_compressed(format):
        return gzip.open(fullpath, 'r').read()
    else:
        body = open(fullpath, 'rb').read()
        return body
