change reduce input cache to memory