source: frontend/node_modules/workbox-precaching/src/precache.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.2 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
9import {getOrCreatePrecacheController} from './utils/getOrCreatePrecacheController.js';
10import {PrecacheEntry} from './_types.js';
11import './_version.js';
12
13/**
14 * Adds items to the precache list, removing any duplicates and
15 * stores the files in the
16 * {@link workbox-core.cacheNames|"precache cache"} when the service
17 * worker installs.
18 *
19 * This method can be called multiple times.
20 *
21 * Please note: This method **will not** serve any of the cached files for you.
22 * It only precaches files. To respond to a network request you call
23 * {@link workbox-precaching.addRoute}.
24 *
25 * If you have a single array of files to precache, you can just call
26 * {@link workbox-precaching.precacheAndRoute}.
27 *
28 * @param {Array<Object|string>} [entries=[]] Array of entries to precache.
29 *
30 * @memberof workbox-precaching
31 */
32function precache(entries: Array<PrecacheEntry | string>): void {
33 const precacheController = getOrCreatePrecacheController();
34 precacheController.precache(entries);
35}
36
37export {precache};
Note: See TracBrowser for help on using the repository browser.