use crate::{db::Db, error::Error};
use activitystreams::iri_string::types::IriString;
use uuid::Uuid;
#[derive(Clone, Debug)]
pub struct MediaCache {
db: Db,
}
impl MediaCache {
pub(crate) fn new(db: Db) -> Self {
MediaCache { db }
}
#[tracing::instrument(level = "debug", name = "Get media uuid", skip_all, fields(url = url.to_string().as_str()))]
pub(crate) async fn get_uuid(&self, url: IriString) -> Result