move eventidshort_cache to service

This commit is contained in:
Charles Hall 2024-09-30 21:45:04 -07:00
parent 095ee483ac
commit 2b2b4169df
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
5 changed files with 49 additions and 39 deletions

View file

@ -6,10 +6,11 @@ use super::{ShortEventId, ShortRoomId, ShortStateHash, ShortStateKey};
use crate::Result;
pub(crate) trait Data: Send + Sync {
/// The returned bool indicates whether it was created
fn get_or_create_shorteventid(
&self,
event_id: &EventId,
) -> Result<ShortEventId>;
) -> Result<(ShortEventId, bool)>;
fn get_shortstatekey(
&self,