From e7a1d76f0562deaf990563394a1f6ede5cef4924 Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Thu, 16 Jul 2026 01:34:56 +0200 Subject: Added jetstream monitoring --- fetchers/cache.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fetchers/cache.go') diff --git a/fetchers/cache.go b/fetchers/cache.go index 11a43f3..4196792 100644 --- a/fetchers/cache.go +++ b/fetchers/cache.go @@ -61,6 +61,16 @@ func (c *Cache) Set(uri string, note *notes.Note) { c.client.Set(c.ctx, key, data, c.expiryTime) } +func (c *Cache) Delete(uri string) { + key := fmt.Sprintf("post:%s", uri) + c.client.Del(c.ctx, key) +} + +func (c *Cache) DeleteAuthor(did string) { + key := fmt.Sprintf("profile:%s", did) + c.client.Del(c.ctx, key) +} + func (c *Cache) GetAuthor(did string) (*notes.Author, bool) { key := fmt.Sprintf("profile:%s", did) data, err := c.client.Get(c.ctx, key).Bytes() -- cgit v1.2.3