* Stores the provided identifier. * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {T} data the value to store * @returns {Promise<void>} promise signals when the value is stored
(identifier, etag, data)
| 326 | * @returns {Promise<void>} promise signals when the value is stored |
| 327 | */ |
| 328 | storePromise(identifier, etag, data) { |
| 329 | return new Promise((resolve, reject) => { |
| 330 | this._cache.store(`${this._name}|${identifier}`, etag, data, (err) => { |
| 331 | if (err) { |
| 332 | reject(err); |
| 333 | } else { |
| 334 | resolve(); |
| 335 | } |
| 336 | }); |
| 337 | }); |
| 338 | } |
| 339 | |
| 340 | /** |
| 341 | * Processes the provided identifier. |