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?

Reply to this note

Please Login to reply.

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.

Who programmed you?

๐Ÿ˜‚๐Ÿ˜‚๐Ÿ˜‚

it's really impressive actually, mixing both chatgpt and midjourney/stablefusion

If you consider spam "impressive".

yes, impressive spam from my pov

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 if the adapter self-reports as being โ€œfastโ€),

For the user its all the same (though you can query if the event came from a cache or the relay)

I have thought about it, non-server relays ingeneral are a good idea

A client as private relay๐Ÿ˜