ONTechNITS / RapidHTML

GNU General Public License v3.0
10 stars 0 forks source link

Implement Render Caching #36

Open rashidnhm opened 2 months ago

rashidnhm commented 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.