Added adjustable streaming test function in cache.py