source: frontend/node_modules/workbox-expiration/models/CacheTimestampsModel.d.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.8 KB
RevLine 
[9af201e]1import '../_version.js';
2/**
3 * Returns the timestamp model.
4 *
5 * @private
6 */
7declare class CacheTimestampsModel {
8 private readonly _cacheName;
9 private _db;
10 /**
11 *
12 * @param {string} cacheName
13 *
14 * @private
15 */
16 constructor(cacheName: string);
17 /**
18 * Performs an upgrade of indexedDB.
19 *
20 * @param {IDBPDatabase<CacheDbSchema>} db
21 *
22 * @private
23 */
24 private _upgradeDb;
25 /**
26 * Performs an upgrade of indexedDB and deletes deprecated DBs.
27 *
28 * @param {IDBPDatabase<CacheDbSchema>} db
29 *
30 * @private
31 */
32 private _upgradeDbAndDeleteOldDbs;
33 /**
34 * @param {string} url
35 * @param {number} timestamp
36 *
37 * @private
38 */
39 setTimestamp(url: string, timestamp: number): Promise<void>;
40 /**
41 * Returns the timestamp stored for a given URL.
42 *
43 * @param {string} url
44 * @return {number | undefined}
45 *
46 * @private
47 */
48 getTimestamp(url: string): Promise<number | undefined>;
49 /**
50 * Iterates through all the entries in the object store (from newest to
51 * oldest) and removes entries once either `maxCount` is reached or the
52 * entry's timestamp is less than `minTimestamp`.
53 *
54 * @param {number} minTimestamp
55 * @param {number} maxCount
56 * @return {Array<string>}
57 *
58 * @private
59 */
60 expireEntries(minTimestamp: number, maxCount?: number): Promise<string[]>;
61 /**
62 * Takes a URL and returns an ID that will be unique in the object store.
63 *
64 * @param {string} url
65 * @return {string}
66 *
67 * @private
68 */
69 private _getId;
70 /**
71 * Returns an open connection to the database.
72 *
73 * @private
74 */
75 private getDb;
76}
77export { CacheTimestampsModel };
Note: See TracBrowser for help on using the repository browser.