Refactor IDistributedCache to use Stream.