Open rashidnhm opened 2 months ago
Currently, whenever a user lands on a page, we render the HTML server side and return the response.
This is expensive! If thousands of users are landing on the page, we'd be rendering it thousands of times / second.
Rather, we should have a form of expiring cache (maybe LRU?).
When a user lands on a page, the rendered response is cache by the app. Subsequent requests hit the cache and avoid re-rendering.
We can attach a type of timer to the cache, one expired we re-render.
Currently, whenever a user lands on a page, we render the HTML server side and return the response.
This is expensive! If thousands of users are landing on the page, we'd be rendering it thousands of times / second.
Rather, we should have a form of expiring cache (maybe LRU?).
When a user lands on a page, the rendered response is cache by the app. Subsequent requests hit the cache and avoid re-rendering.
We can attach a type of timer to the cache, one expired we re-render.