From 5f8b979b70db212a28234c93919b324ba12e7c1b Mon Sep 17 00:00:00 2001 From: guitavano Date: Thu, 13 Feb 2025 13:10:32 -0300 Subject: [PATCH] remove cache in module --- linx/loaders/auction/apiList.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/linx/loaders/auction/apiList.ts b/linx/loaders/auction/apiList.ts index 3a61fd539..9f09ef04a 100644 --- a/linx/loaders/auction/apiList.ts +++ b/linx/loaders/auction/apiList.ts @@ -1,8 +1,6 @@ import { Auction } from "../../utils/types/auctionAPI.ts"; import type { AppContext } from "../../../linx/mod.ts"; -let cachedPromise: Promise | null = null; -let lastUpdate: number = Date.now(); /** * @title Linx Integration * @description Search Wishlist loader @@ -14,11 +12,6 @@ const loader = ( ): Promise => { const { layer } = ctx; - if (cachedPromise && Date.now() - lastUpdate < (60 * 1000)) { - return cachedPromise; - } - - lastUpdate = Date.now(); const responsePromise = layer ["POST /v1/Catalog/API.svc/web/SearchProductAuctions"]( {}, @@ -28,7 +21,6 @@ const loader = ( return await response.json(); }); - cachedPromise = responsePromise; return responsePromise; };