implement replaycache