File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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
8586PageCache . sourcedFrom ( PageCacheResource ) ;
You can’t perform that action at this time.
0 commit comments