implementing AutoCache

implementing AutoCache