August 2017
Beginner
374 pages
10h 41m
English
Since the index page gets accessed very frequently, we can cache its HTML markup and store its state in memory to be able to immediately serve the index page to clients. This further improves the performance of our application.
We are now going to implement a very simple caching technique:
let cachedResult = false
const isIndexPage = req.url === '/' || req.url === '/index.html'
if (isIndexPage) { if ...Read now
Unlock full access