UNPKG

data-validator-js

Version:
26 lines (25 loc) 778 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var dictionary_1 = require("./dictionary"); var CachingUtility = /** @class */ (function () { function CachingUtility() { this.cache = new dictionary_1.default(); } /** * Performs upsert function in the cache Dictionary * @param key {string} * @param value {any} */ CachingUtility.prototype.Add = function (key, value) { this.cache.upsert(key, value); }; /** * Gets the Value entry for a corresponding key the cache Dictionary * @param key {string} */ CachingUtility.prototype.Get = function (key) { return this.cache.getValue(key); }; return CachingUtility; }()); exports.CachingUtility = CachingUtility;