mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(web): cache home/lists page for 1 day to match api cache
This commit is contained in:
parent
a6b774ce48
commit
37552bb388
1 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,9 @@
|
|||
import { FilterlistTable, Filterlist } from "@/components/filterlist-table";
|
||||
|
||||
const getFilterlists = async (): Promise<Filterlist[]> => {
|
||||
const res = await fetch("https://api.filterlists.com/lists");
|
||||
const res = await fetch("https://api.filterlists.com/lists", {
|
||||
next: { revalidate: 86400 },
|
||||
});
|
||||
if (!res.ok) throw new Error("Failed to fetch lists");
|
||||
return res.json();
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue