Implemented user deserialize cache

This commit is contained in:
2026-01-21 01:03:46 -05:00
parent ce093af58e
commit a0a405de85
4 changed files with 88 additions and 21 deletions

19
api/src/services/cache/cache.ts vendored Normal file
View File

@@ -0,0 +1,19 @@
export class CacheService<Key, Value> {
private cacheMap: Map<Key, Value>
constructor() {
this.cacheMap = new Map<Key, Value>();
}
public Get(key: Key): Value {
return this.cacheMap.get(key)
}
public Set(key: Key, value: Value) {
this.cacheMap.set(key, value);
}
public Invalidate(key: Key): boolean {
return this.cacheMap.delete(key);
}
}