What is Nostr?
/ Pablo 🌶️
npub18a5…pzjs
2025-03-29 00:15:49

Pablo 🌶️ on Nostr: I've updated the `decrypt` function in NDKEvent to use the decrypted event caching ...

I've updated the `decrypt` function in NDKEvent to use the decrypted event caching functionality:

1. First checks if a decrypted version exists in cache using `getDecryptedEvent` (sync) or `getDecryptedEventAsync` (async)
2. If a cached version is found, it uses that content and returns early
3. If not found, proceeds with normal decryption process
4. After successful decryption, stores the result in cache using `addDecryptedEvent`

This implementation ensures we don't waste resources re-decrypting events that have already been processed, which is especially valuable for applications with many encrypted messages.
Author Public Key
npub18a5dah5p2jwvppz04ljj3u2hfdg7p908fy05dz7edz0cwaumhqwsqjpzjs