mirror of
https://github.com/nostrlabs-io/notepush.git
synced 2025-06-20 21:19:51 +00:00
Add Nostr event cache
This commit adds a simple in-memory Nostr Event cache, to reduce the amount of bandwidth used as well as to improve performance. Testing ------- Setup: - Two iPhone simulators running Damus and on different accounts - Damus version: 774da239b92ed630fbf91fce42d9e233661c0d7f - Notepush: This commit - Push notifications turned on, setup to connect to localhost, and configured to receive DM notifications - Run Notepush with `RUST_LOG=DEBUG` env variable for debug logging Steps: 1. Send a DM from one account to another. - Push notification should arrive with a few seconds delay - Push notification logs should mention that the event was cached 2. Send a DM again. - Push notification should arrive immediately 3. Wait for more than a minute 4. Send a DM again. - Push notification should take a few seconds again - Push notification logs should mention that the cache item expired and was deleted Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Closes: https://github.com/damus-io/notepush/issues/3
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
pub mod nostr_network_helper;
|
||||
mod nostr_event_extensions;
|
||||
mod nostr_event_cache;
|
||||
pub mod notification_manager;
|
||||
|
||||
pub use nostr_network_helper::NostrNetworkHelper;
|
||||
|
Reference in New Issue
Block a user