better cache

This commit is contained in:
2026-02-10 01:20:58 -05:00
parent c773affbc8
commit f056e67eae
39 changed files with 830 additions and 17 deletions

View File

@@ -0,0 +1,22 @@
import "dotenv/config";
import { createCacheFromEnv } from "../src/lib/cache";
function log(msg: string) {
// eslint-disable-next-line no-console
console.log(`[cache-clear] ${msg}`);
}
async function main() {
const cache = await createCacheFromEnv(process.env, { namespace: "fast-website", log });
await cache.flush();
await cache.close();
log("ok");
}
main().catch((e) => {
// eslint-disable-next-line no-console
console.error(`[cache-clear] failed: ${String(e)}`);
process.exitCode = 1;
});