Sha256: 0af83036acc67210afdd61de17ef0b5c6331adfb96c99d056219b5da41bacb76
Contents?: true
Size: 586 Bytes
Versions: 15
Compression:
Stored size: 586 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
15 entries across 15 versions & 1 rubygems