Skip to content

Commit 0e4d465

Browse files
committed
removed cached id variable
1 parent e352376 commit 0e4d465

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

resources.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export class PageCacheResource extends PageCache {
5757

5858
const pageURL = "https://www.google.com/"; // URL of the page to cache
5959

60-
const cacheId = `/examplePage/{this.getId}`; // the ID of the page to cache (example: https://www.birkenstock.com/us/men/ or /us/men/)
6160

6261
const response = await fetch(pageURL); // Fetch the page content
6362

@@ -75,11 +74,13 @@ export class PageCacheResource extends PageCache {
7574
const convertHtmlTextToStr = await response.text();
7675

7776
//Return the cached data in a structured format
78-
return { id: cacheId, cachedData: convertHtmlTextToStr };
77+
return {cachedData: convertHtmlTextToStr}
7978

8079
}
8180
}
8281

83-
// you can access the cache from the browser using the following URL: http://localhost:9926/PageCache/<cacheId>
82+
// you can access the cache from the browser using the following URL: http://localhost:9926/PageCache/<cacheId>(e.g. /examplePage)
83+
84+
// The ID is set using HarperDB REST handler
8485

8586
PageCache.sourcedFrom(PageCacheResource);

0 commit comments

Comments
 (0)