|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | Copyright 2019 Google LLC
|
|---|
| 3 |
|
|---|
| 4 | Use of this source code is governed by an MIT-style
|
|---|
| 5 | license that can be found in the LICENSE file or at
|
|---|
| 6 | https://opensource.org/licenses/MIT.
|
|---|
| 7 | */
|
|---|
| 8 | import { getOrCreatePrecacheController } from './utils/getOrCreatePrecacheController.js';
|
|---|
| 9 | import './_version.js';
|
|---|
| 10 | /**
|
|---|
| 11 | * Adds items to the precache list, removing any duplicates and
|
|---|
| 12 | * stores the files in the
|
|---|
| 13 | * {@link workbox-core.cacheNames|"precache cache"} when the service
|
|---|
| 14 | * worker installs.
|
|---|
| 15 | *
|
|---|
| 16 | * This method can be called multiple times.
|
|---|
| 17 | *
|
|---|
| 18 | * Please note: This method **will not** serve any of the cached files for you.
|
|---|
| 19 | * It only precaches files. To respond to a network request you call
|
|---|
| 20 | * {@link workbox-precaching.addRoute}.
|
|---|
| 21 | *
|
|---|
| 22 | * If you have a single array of files to precache, you can just call
|
|---|
| 23 | * {@link workbox-precaching.precacheAndRoute}.
|
|---|
| 24 | *
|
|---|
| 25 | * @param {Array<Object|string>} [entries=[]] Array of entries to precache.
|
|---|
| 26 | *
|
|---|
| 27 | * @memberof workbox-precaching
|
|---|
| 28 | */
|
|---|
| 29 | function precache(entries) {
|
|---|
| 30 | const precacheController = getOrCreatePrecacheController();
|
|---|
| 31 | precacheController.precache(entries);
|
|---|
| 32 | }
|
|---|
| 33 | export { precache };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.