feat: add caching for nostr-native articles

- Add localStorage caching for kind:30023 articles (same as web articles)
- Cache TTL: 7 days
- Cache key prefix: article_cache_
- Add bypassCache parameter to fetchArticleByNaddr()
- Log cache hits and misses for debugging
- Gracefully handle storage errors

Articles are now cached locally after first fetch, making subsequent
loads instant and reducing relay queries.
This commit is contained in:
Gigi
2025-10-05 09:17:07 +01:00
parent ca46feb80f
commit ee788cffb0
3 changed files with 73 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
---
alwaysApply: true
description: nostr highlights spec and docs
alwaysApply: false
---
Here's the spec for nostr-native highlights:
- https://github.com/nostr-protocol/nips/blob/master/84.md
- https://nostrbook.dev/kinds/9802