use crate::{
db::{Db, MediaMeta},
error::MyError,
};
use activitystreams::url::Url;
use actix_web::web::Bytes;
use std::time::{Duration, SystemTime};
use uuid::Uuid;
static MEDIA_DURATION: Duration = Duration::from_secs(60 * 60 * 24 * 2);
#[derive(Clone)]
pub struct MediaCache {
db: Db,
}
impl MediaCache {
pub fn new(db: Db) -> Self {
MediaCache { db }
}
pub async fn get_uuid(&self, url: Url) -> Result