RobertBoes / sidecar-inertia-vite

A Sidecar function to run Inertia server-side rendering with Vite on Lambda.
MIT License
17 stars 7 forks source link

Feat: Caching Sidecar requests #5

Open RobertBoes opened 1 year ago

RobertBoes commented 1 year ago

This is very much a WIP as I'm still not sure about the implementation and it requires quite a bit of testing

The idea here is to have configurable caching strategies, currently the most sensible (to me) caching strategy would be based on the page object, unique page objects would require fresh SSR content. The page object contains the current URL, the data and the component to be rendered. In the PageHashStrategy I'm creating a hash from that object and using that to determine the cache key