Dealing with legacy RLS ..while using a cache
Hi, I'm working on an app that relies heavily of RLS and auth.uid() for filtering secured data. Long term I cant have all users hitting the database on multple times for every page in my app and will need to read from a read replica or ideally some kind of updateable cache. Obviously using a cache could lead to leaking secure data without some heavy query customization (and/or extra denormalized fields everywhere which couldeasily introduce bugs over time). Has anyone came up with a good solution for this ?