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

    Function clearExcludedProducts

    • Remove the excluded-products row from IndexedDB entirely. After this, a subsequent getExcludedProducts() returns {}. Used by the bulk clearAllCaches flow; callers don't typically invoke this directly.

      Returns Promise<void>

      Resolves once the delete completes; errors are logged, not thrown.

      await clearExcludedProducts();
      const excluded = await getExcludedProducts(); // => {}
      export async function clearExcludedProducts(): Promise<void> {
      try {
      const db = await getDB();
      await db.delete(IDB_STORE.EXCLUDED_PRODUCTS, 'current');
      } catch (error) {
      logger.error('Failed to clear excluded products from IndexedDB', { error });
      }
      }