Adds cache option to turn on/off caching.