hello123456

<p>async purgeCache(agentName, conversationId) {<br /> &nbsp; &nbsp; // Construct the key for cache purging<br /> &nbsp; &nbsp; const cacheKey = `${agentName}-${conversationId}-actions`;</p> <p>&nbsp; &nbsp; // Retrieve the base URL from configuration and append the cacheKey<br /> &nbsp; &nbsp; const baseUrl = this.configService.get(&#39;PURGE_CACHE_URL&#39;); // Assuming this is how you get config value<br /> &nbsp; &nbsp; const purgeUrl = `${baseUrl}?appName=CVS_APP&amp;context=chatfulfillment&amp;keys=${encodeURIComponent(cacheKey)}`;</p> <p>&nbsp; &nbsp; const headers = {<br /> &nbsp; &nbsp; &nbsp; &nbsp; // Your headers here<br /> &nbsp; &nbsp; };</p> <p>&nbsp; &nbsp; // Make a request to the cache purge endpoint<br /> &nbsp; &nbsp; try {<br /> &nbsp; &nbsp; &nbsp; &nbsp; await this.axiosUtil.getInstance().get(purgeUrl, { headers });<br /> &nbsp; &nbsp; &nbsp; &nbsp; new Logger().log(&#39;Cache successfully purged&#39;);<br /> &nbsp; &nbsp; } catch (error) {<br /> &nbsp; &nbsp; &nbsp; &nbsp; new Logger().error(`Error purging cache: ${error}`);<br /> &nbsp; &nbsp; &nbsp; &nbsp; // Handle error as appropriate<br /> &nbsp; &nbsp; }<br /> }<br /> &nbsp;</p>