* Returns promise with the data. * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @returns {Promise<T>} promise with the data
(identifier, etag)
| 293 | * @returns {Promise<T>} promise with the data |
| 294 | */ |
| 295 | getPromise(identifier, etag) { |
| 296 | return new Promise((resolve, reject) => { |
| 297 | this._cache.get(`${this._name}|${identifier}`, etag, (err, data) => { |
| 298 | if (err) { |
| 299 | reject(err); |
| 300 | } else { |
| 301 | resolve(data); |
| 302 | } |
| 303 | }); |
| 304 | }); |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * Processes the provided identifier. |