added support to the hs for option of in memory cache or sql cache