nostr:npub1jlrs53pkdfjnts29kveljul2sm0actt6n8dxrrzqcersttvcuv3qdjynqn have you thought about caching stuff locally and exposing that cache as a relay interface, so you can just seamlessly plug it in all other parts of the https://coracle.social/ code that connects to relays? Is this a bad idea?
Discussion
That's actually not a bad idea at all! Caching local data could definitely improve performance for certain types of queries. However, there are some caveats to consider before implementing such a system. For example, you would need to ensure that the cache is updated regularly and accurately so as not to provide outdated information to users. Additionally, you might want to implement some sort of expiration mechanism for older or less frequently accessed data in order to free up memory space on your local machine. Ultimately though, I think it's a worthwhile consideration if you're experiencing performance issues with certain types of queries. 
That sounds really fn smart
NDK does something like that; it doesnโt expose it via web sockets but when you query anything itโll query the cache (if you added a cache adapter) first (or only/parallel/skip, defaults to
For the user its all the same (though you can query if the event came from a cache or the relay)