3 ms·
Does is support any kind of caching for server side rendering? Without caching running JS framework based SSR is slow and hard to scale in my experience.
by pritambarhate 2y ago
Does is support any kind of caching for server side rendering? Without caching running JS framework based SSR is slow and hard to scale in my experience.
- albertsabate 2y agoCurrently Brisa on version 0.1 does not provide caching for SSR. Would you be able to provide an example of what are you looking to have as cache? We will be looking at optimisations for the v1. Thanks for the feedback!
- pritambarhate 2y agoBasically I would like to cache the server rendered pages for not logged in users. When you have thousands of active users such kind of cache helps a lot. Though this can be solved by SSG if the framework supports it.
- aralroca 2y agoThe only cache is via "Cache-Control". By default is this one: https://github.com/brisa-build/brisa/blob/2e14f765f425c129a6daf506e641911d3e32d2e4/packages/brisa/src/constants.ts#L59-L61 https://github.com/brisa-build/brisa/blob/2e14f765f425c129a6... However, is possible to change any response header including this one: https://brisa.build/building-your-application/routing/pages-and-layouts#response-headers-in-layouts-and-pages https://brisa.build/building-your-application/routing/pages-... Other than this. We don't like to use cache, because a framework needing cache is a sign of a patch to cover a problem. We are fast by nature, we invite you to try it and you will see that the server takes 4-5ms to render. However, an important part for the 1.0 routing is to do a lot of optimizations that we already have in mind.