Sha256: 42a4b87f7bfc213be70ee4e5d24db8265393797d30c2de49673d60bb128c0203
Contents?: true
Size: 557 Bytes
Versions: 39
Compression:
Stored size: 557 Bytes
Contents
let _cache = {} let _instance = null const v4 = require('../../utils/uuid/v4') class ReferencesCache { static getInstance() { if (_instance === null) { _instance = new ReferencesCache() } return _instance } cacheReference(reference) { let id = v4() _cache[id] = reference return id } resolveReference(id) { return _cache[id] } deleteReference(referenceGuid) { delete _cache[referenceGuid] return 0; } } module.exports = ReferencesCache
Version data entries
39 entries across 24 versions & 1 rubygems