_scripts/bust-kv-cache.mjs#!/usr/bin/env node// Bust the KV cache for likes/shares. Next read per post will rehydrate// from Postgres.//// Usage:// npm run bust:kv # wipe all posts// npm run bust:kv -- --posts=12,34 # wipe specific post IDs// npm run bust:kv -- --dry-run # preview without deletingimport fs from 'fs'import path from 'path'import { fileURLToPath } from 'url'import { createClient } from '@vercel/kv'const __filename = fileURLToPath(import.meta.url)const __dirname = path.dirname(__filename)const ROOT_DIR = path.resolve(__dirname, '..')function loadEnvFile(file) {
Showing the first 20 lines.
Get full code