Got completely distracted the past two days but I think it will be worth it. I'm about half way through designing a modular event loading system for applesauce. This would allow and app to pull in parts and customize how their app loads profiles. for example you could load from 2 event caches, a local relay, and then finally make connections out to public relays to look for the profiles Still very much a WIP though, so not sure how will it will actually work image

Replies (5)

Does this have time-based cache invalidation? The problem I've run into with checking the cache first is you don't know if there's a new version of a replaceable event
no not yet, but this is why I'm trying to make things modular. it shouldn't be hard to modify the "load from cache" function to only look for events that had some "checked" flag newer than a week 🤔
Default avatar
npub1cesr...t37c 10 months ago
So you can compose multiple loaders and can create multiple strategies of them? btw do you consume them directly in the UI?
Composing loaders maybe get very complicated because of caching and batching requests. But if they are customizable enough then it should be possible. I don't know yet because I still need to figure out how to get batching to work For using them in the UI, the idea would be for the UI components to trigger them, but still use the event store as the source of truth