add cache support for plan