ChemPal Documentation - v1.18.0
    Preparing search index...

    Function clearSupplierQueryCache

    • Empties the supplier query cache, forcing the next search to refetch.

      Returns Promise<void>

      Resolves once the store is empty.

      await clearSupplierQueryCache();
      
      export async function clearSupplierQueryCache(): Promise<void> {
      try {
      const db = await getDB();
      await db.clear(IDB_STORE.SUPPLIER_QUERY_CACHE);
      } catch (error) {
      logger.error(`Failed to clear supplier query cache from IndexedDB: ${getErrorMessage(error)}`, {
      error,
      });
      }
      }