Expand description
Local cache for Todoist data.
This crate provides a local cache that mirrors the Sync API response structure, enabling efficient incremental updates and offline read access.
§Storage
The cache is stored on disk using XDG-compliant paths via CacheStore:
- Unix:
~/.cache/td/cache.json - macOS:
~/Library/Caches/td/cache.json - Windows:
C:\Users\<User>\AppData\Local\td\cache\cache.json
§Example
use todoist_cache_rs::{Cache, CacheStore};
// Create a store with the default XDG path
let store = CacheStore::new()?;
// Load existing cache or create a new one
let mut cache = store.load_or_default()?;
// Modify the cache...
cache.sync_token = "new_token".to_string();
// Save changes to disk
store.save(&cache)?;Modules§
- filter
- Filter expression parser and evaluator for Todoist filter syntax.
Structs§
- Cache
- Local cache for Todoist data.
- Cache
Indexes - Indexes for O(1) cache lookups.
- Cache
Store - Persistent storage for the Todoist cache.
- Sync
Manager - Orchestrates synchronization between the Todoist API and local cache.
Enums§
- Cache
Store Error - Errors that can occur during cache storage operations.
- Sync
Error - Errors that can occur during sync operations.
Type Aliases§
- Cache
Store Result - Result type for cache store operations.
- Sync
Result - Result type for sync operations.