(#1233) - add option for cache

need to add a test