Skip to content

Commit

Permalink
Update notion lib with cache changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Muir committed Sep 20, 2023
1 parent 571015f commit e5292e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const recordMapParser = (recordMap: any) => {
};

export const getPublishedArticles = async (sanitize: boolean = false) => {
const cache = new Cache("articles/index");
const cache = new Cache({ key: "articles/index" });
const cached = await cache.get();
if (cached !== undefined) {
console.log(`Using cached articles`)
Expand Down Expand Up @@ -90,7 +90,7 @@ const bookmarkify = async (db: Database, blocks: any) => {
}

export const getPage = async (db: Database, pageId: string) => {
const cache = new Cache(`articles/${pageId}`);
const cache = new Cache({ key: `articles/${pageId}`, db });
const cached = await cache.get();
if (cached !== undefined) {
console.log(`Using cached page ${pageId}`)
Expand Down

0 comments on commit e5292e4

Please sign in to comment.