Rocky_Mountain_Vending/.pnpm-store/v10/files/b7/3f913c0b9dbc068386e9d2e3d22d0831fdfb3b26c3af0c8a3894755d58cf87930c7bf1d96005b9a37b004dc3ef27eec27467c528c0c4716c58ab77c7faa52d
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

31 lines
No EOL
1.2 KiB
Text

// We share the tags manifest between the "use cache" handlers and the previous
// file-system cache.
export const tagsManifest = new Map();
export const areTagsExpired = (tags, timestamp)=>{
for (const tag of tags){
const entry = tagsManifest.get(tag);
const expiredAt = entry == null ? void 0 : entry.expired;
if (typeof expiredAt === 'number') {
const now = Date.now();
// For immediate expiration (expiredAt <= now) and tag was invalidated after entry was created
// OR for future expiration that has now passed (expiredAt > timestamp && expiredAt <= now)
const isImmediatelyExpired = expiredAt <= now && expiredAt > timestamp;
if (isImmediatelyExpired) {
return true;
}
}
}
return false;
};
export const areTagsStale = (tags, timestamp)=>{
for (const tag of tags){
const entry = tagsManifest.get(tag);
const staleAt = (entry == null ? void 0 : entry.stale) ?? 0;
if (typeof staleAt === 'number' && staleAt > timestamp) {
return true;
}
}
return false;
};
//# sourceMappingURL=tags-manifest.external.js.map