* Returns promise. * @param {string} identifier unique name for the resource * @param {Etag | null} etag etag of the resource * @param {Data} data cached content * @returns {Promise<void>} promise
(identifier, etag, data)
| 1395 | * @returns {Promise<void>} promise |
| 1396 | */ |
| 1397 | store(identifier, etag, data) { |
| 1398 | if (this.readonly) return Promise.resolve(); |
| 1399 | |
| 1400 | return this._getPack().then((pack) => { |
| 1401 | pack.set(identifier, etag === null ? null : etag.toString(), data); |
| 1402 | }); |
| 1403 | } |
| 1404 | |
| 1405 | /** |
| 1406 | * Returns promise to the cached content. |
no test coverage detected