I'm making a chat app where the user can send/receive messages, which are stored in supabase. I want to cache these messages client-side using IndexedDB or LocalStorage to allow users to instantly view their messages upon page exits and re-entries, without fetching from the db every time. To me, this just seems idiomatic, allowing for instant loading as well as saving bandwidth
"localstorage/indexdb can be cleared by client" -> all caches get stale sometimes, just refetch
"your localstorage is not accessible on other devices" -> that's fine, just fetch from server like normal
"5mb limit for localstorage" -> indexedDB is limited by disk space
maybe I'm missing something obvious?