Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/*2 Copyright 2020 Google LLC3 4 Use of this source code is governed by an MIT-style5 license that can be found in the LICENSE file or at6 https://opensource.org/licenses/MIT.7*/8import {warmStrategyCache} from './warmStrategyCache';9import {registerRoute} from 'workbox-routing/registerRoute.js';10import {StaleWhileRevalidate} from 'workbox-strategies/StaleWhileRevalidate.js';11import {CacheableResponsePlugin} from 'workbox-cacheable-response/CacheableResponsePlugin.js';12import {13 RouteMatchCallback,14 RouteMatchCallbackOptions,15 WorkboxPlugin,16} from 'workbox-core/types.js';17 18import './_version.js';19 20export interface StaticResourceOptions {21 cacheName?: string;22 matchCallback?: RouteMatchCallback;23 plugins?: Array<WorkboxPlugin>;24 warmCache?: Array<string>;25}26 27/**28 * An implementation of the [CSS and JavaScript files recipe]{@link https://developers.google.com/web/tools/workbox/guides/common-recipes#cache_css_and_javascript_files}29 *30 * @memberof workbox-recipes31 *32 * @param {Object} [options]33 * @param {string} [options.cacheName] Name for cache. Defaults to static-resources34 * @param {RouteMatchCallback} [options.matchCallback] Workbox callback function to call to match to. Defaults to request.destination === 'style' || request.destination === 'script' || request.destination === 'worker';35 * @param {WorkboxPlugin[]} [options.plugins] Additional plugins to use for this recipe36 * @param {string[]} [options.warmCache] Paths to call to use to warm this cache37 */38function staticResourceCache(options: StaticResourceOptions = {}): void {39 const defaultMatchCallback = ({request}: RouteMatchCallbackOptions) =>40 request.destination === 'style' ||41 request.destination === 'script' ||42 request.destination === 'worker';43 44 const cacheName = options.cacheName || 'static-resources';45 const matchCallback = options.matchCallback || defaultMatchCallback;46 const plugins = options.plugins || [];47 plugins.push(48 new CacheableResponsePlugin({49 statuses: [0, 200],50 }),51 );52 53 const strategy = new StaleWhileRevalidate({54 cacheName,55 plugins,56 });57 58 registerRoute(matchCallback, strategy);59 60 // Warms the cache61 if (options.warmCache) {62 warmStrategyCache({urls: options.warmCache, strategy});63 }64}65 66export {staticResourceCache};67 