From c6be08d540d59a045b94364289d36946dae57205 Mon Sep 17 00:00:00 2001 From: Tushar Moolya Date: Fri, 20 Jun 2025 23:45:21 +0530 Subject: [PATCH] Add method to read all the keys stored in cache Signed-off-by: Tushar Moolya --- @here/olp-sdk-core/lib/cache/LRUCache.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/@here/olp-sdk-core/lib/cache/LRUCache.ts b/@here/olp-sdk-core/lib/cache/LRUCache.ts index 7965ad98..60d91d27 100644 --- a/@here/olp-sdk-core/lib/cache/LRUCache.ts +++ b/@here/olp-sdk-core/lib/cache/LRUCache.ts @@ -194,6 +194,13 @@ export class LRUCache { this.promoteEntry(entry); return entry.value; } + + /** + * @returns List of all the keys stored in the cache + */ + getAllKeys(): MapIterator { + return this.map.keys() + } /** * Clears the cache and removes all stored key-value pairs.