Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
nodejs /
undici /
lib /
cache /
Delete
Unzip
Name
Size
Permission
Date
Action
cache.js
20.33
KB
-rw-r--r--
2023-10-14 10:49
cachestorage.js
3.43
KB
-rw-r--r--
2023-10-14 10:49
symbols.js
73
B
-rw-r--r--
2023-10-14 10:49
util.js
1.04
KB
-rw-r--r--
2023-10-14 10:49
Save
Rename
'use strict' const { kConstruct } = require('./symbols') const { Cache } = require('./cache') const { webidl } = require('../fetch/webidl') const { kEnumerableProperty } = require('../core/util') class CacheStorage { /** * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map * @type {Map<string, import('./cache').requestResponseList} */ #caches = new Map() constructor () { if (arguments[0] !== kConstruct) { webidl.illegalConstructor() } } async match (request, options = {}) { webidl.brandCheck(this, CacheStorage) webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.match' }) request = webidl.converters.RequestInfo(request) options = webidl.converters.MultiCacheQueryOptions(options) // 1. if (options.cacheName != null) { // 1.1.1.1 if (this.#caches.has(options.cacheName)) { // 1.1.1.1.1 const cacheList = this.#caches.get(options.cacheName) const cache = new Cache(kConstruct, cacheList) return await cache.match(request, options) } } else { // 2. // 2.2 for (const cacheList of this.#caches.values()) { const cache = new Cache(kConstruct, cacheList) // 2.2.1.2 const response = await cache.match(request, options) if (response !== undefined) { return response } } } } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-has * @param {string} cacheName * @returns {Promise<boolean>} */ async has (cacheName) { webidl.brandCheck(this, CacheStorage) webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) cacheName = webidl.converters.DOMString(cacheName) // 2.1.1 // 2.2 return this.#caches.has(cacheName) } /** * @see https://w3c.github.io/ServiceWorker/#dom-cachestorage-open * @param {string} cacheName * @returns {Promise<Cache>} */ async open (cacheName) { webidl.brandCheck(this, CacheStorage) webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) cacheName = webidl.converters.DOMString(cacheName) // 2.1 if (this.#caches.has(cacheName)) { // await caches.open('v1') !== await caches.open('v1') // 2.1.1 const cache = this.#caches.get(cacheName) // 2.1.1.1 return new Cache(kConstruct, cache) } // 2.2 const cache = [] // 2.3 this.#caches.set(cacheName, cache) // 2.4 return new Cache(kConstruct, cache) } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-delete * @param {string} cacheName * @returns {Promise<boolean>} */ async delete (cacheName) { webidl.brandCheck(this, CacheStorage) webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) cacheName = webidl.converters.DOMString(cacheName) return this.#caches.delete(cacheName) } /** * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys * @returns {string[]} */ async keys () { webidl.brandCheck(this, CacheStorage) // 2.1 const keys = this.#caches.keys() // 2.2 return [...keys] } } Object.defineProperties(CacheStorage.prototype, { [Symbol.toStringTag]: { value: 'CacheStorage', configurable: true }, match: kEnumerableProperty, has: kEnumerableProperty, open: kEnumerableProperty, delete: kEnumerableProperty, keys: kEnumerableProperty }) module.exports = { CacheStorage }