import {ICache} from '../ICache'; export class MapCache implements ICache { private _cache:Map = new Map(); /** * @override */ public setCachedValue(key:TKey, value:TValue) { this._cache.set(key, value); } /** * @override */ public getCachedValue(key:TKey):TValue { return this._cache.get(key); } /** * @override */ public clear() { this._cache.clear(); } /** * @override */ public size() { return this._cache.size; } /** * @override */ public setEnableLogging(enabled:boolean) { throw Error("UnsupportedException"); } /** * @override */ public isLoggingEnabled():boolean { throw Error("UnsupportedException"); } /** * @override */ public setEnable(enabled:boolean) { throw Error("UnsupportedException"); } }