Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's options, what do you want to cache? One thing to keep in mind is that with LiveView, there is a live process on the server side while the websocket remains connected.

That means that many small things, like fetching user permissions, do not need to be performed again on every single request like a more tradition SPA application would require. Instead you can perform them once when the user connects and then simple store them in the LiveView process. That process can also subscribe to PubSub notifications for changes, which provides a cache invalidation method.

Effectively, a LiveView process functions as a tiny dedicated cache for any given connected user.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: