/** * Helper method that registers a soup with index specs. * * @param soupName Soup name. * @param cacheKey Cache key. */ private void registerSoup(String soupName, String cacheKey) { registerMasterSoup(); if (!doesCacheExist(soupName)) { final IndexSpec[] indexSpecs = {new IndexSpec(CACHE_KEY, Type.string)}; smartStore.registerSoup(soupName, indexSpecs); } }
/** * Helper method that registers a soup with index specs. * * @param soupName Soup name. * @param cacheKey Cache key. */ private void registerSoup(String soupName, String cacheKey) { registerMasterSoup(); if (!doesCacheExist(soupName)) { final IndexSpec[] indexSpecs = { new IndexSpec(String.format(CACHE_DATA_KEY, cacheKey), Type.string), new IndexSpec(String.format(CACHE_TIME_KEY, cacheKey), Type.integer) }; smartStore.registerSoup(soupName, indexSpecs); } }