Skip to content

Commit f1e5e90

Browse files
Add manual refresh and tracking utilities for RSS/Atom collections
Co-authored-by: sam.willis <[email protected]>
1 parent 781fa12 commit f1e5e90

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

docs/overview.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,19 @@ Optional configuration includes:
362362

363363
RSS and Atom collections automatically handle feed parsing, deduplication of items, and provide built-in error recovery. The collections will continue polling even after network failures or parsing errors.
364364

365+
Collections can be manually refreshed when needed:
366+
367+
```ts
368+
// Manually refresh the feed data
369+
await blogFeed.utils.refresh()
370+
371+
// Clear deduplication cache if needed
372+
blogFeed.utils.clearSeenItems()
373+
374+
// Check how many items have been tracked
375+
console.log(`Tracked items: ${blogFeed.utils.getSeenItemsCount()}`)
376+
```
377+
365378
#### `LocalStorageCollection`
366379

367380
localStorage collections store small amounts of local-only state that persists across browser sessions and syncs across browser tabs in real-time. All data is stored under a single localStorage key and automatically synchronized using storage events.

packages/rss-db-collection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ RSS/Atom feed collection for TanStack DB - sync data from RSS and Atom feeds wit
55
## Features
66

77
- **📡 RSS & Atom Support**: Dedicated option creators for RSS 2.0 and Atom 1.0 feeds
8-
- **🔄 Automatic Polling**: Configurable polling intervals with intelligent error recovery
8+
- **🔄 Automatic Polling**: Configurable polling intervals with intelligent error recovery and manual refresh capability
99
- **✨ Deduplication**: Built-in deduplication based on feed item IDs/GUIDs
1010
- **🔧 Transform Functions**: Custom transform functions to normalize feed data to your schema
1111
- **📝 Full TypeScript Support**: Complete type safety with schema inference

0 commit comments

Comments
 (0)