Skip to content

Commit 852ab3b

Browse files
committed
Add method to read all the keys stored in cache
1 parent cc0e669 commit 852ab3b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

@here/olp-sdk-core/lib/cache/LRUCache.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ export class LRUCache<Key, Value> {
194194
this.promoteEntry(entry);
195195
return entry.value;
196196
}
197+
198+
/**
199+
* @returns List of all the keys stored in the cache
200+
*/
201+
getAllKeys(): MapIterator<Key> {
202+
return this.map.keys()
203+
}
197204

198205
/**
199206
* Clears the cache and removes all stored key-value pairs.

0 commit comments

Comments
 (0)