Skip to content

Commit ca0a63a

Browse files
committed
lint
1 parent 2f0919e commit ca0a63a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
import { GetStaticProps, InferGetStaticPropsType } from 'next';
32
import { RSSFeed } from '../types/rss';
43
import { parseRSSFeed } from '../lib/rssParser';
54

lib/rssParser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export async function parseRSSFeed(url: string): Promise<RSSFeed> {
3030
// Handle both single item and array of items
3131
const rawItems = Array.isArray(channel.item) ? channel.item : [channel.item].filter(Boolean);
3232

33+
// eslint-disable-next-line
3334
const items: RSSItem[] = rawItems.map((item: any) => ({
3435
title: item.title || '',
3536
description: item.description || '',
@@ -87,7 +88,7 @@ class RSSCache {
8788

8889
if (!entry) return null;
8990

90-
const isExpired = Date.now() - entry.timestamp > entry.ttl;
91+
const isExpired = Date.now() - entry.timestamp > entry.ttl || Date.now() - entry.timestamp > (ttlMinutes * 60 * 1000);
9192
if (isExpired) {
9293
this.cache.delete(url);
9394
return null;

0 commit comments

Comments
 (0)