now cache can ajust itself to save memory]