void destroySearch() { /* Ok, now we're done. Burn it down */ destroyCache(cache); cache = NULL; destroyFilelist(files); files = NULL; TKDestroy(tok); tok = NULL; }
MojErr MojDbSearchCache::updateCache(const QueryKey& a_key, const IdSet& a_ids) { // Skip updating the cache ONLY if up-to-date cache is available. // if (contain(a_key) == true) return MojErrNone; // Delete any cache for this query/kind here. // MojErr err = destroyCache(a_key.getKind()); MojErrCheck(err); // Add new cache. // err = createCache(a_key, a_ids); MojErrCheck(err); return MojErrNone; }