changed: Have CanWriteToCache return amount of bytes that can be written