feat: remove croxy proxy and image cache features

This commit is contained in:
asepharyana
2026-07-22 14:51:08 +07:00
parent 891064354b
commit 5c51ec895f
35 changed files with 42 additions and 2799 deletions
-19
View File
@@ -1,19 +0,0 @@
//! Repository trait for image cache (original → CDN mapping).
use async_trait::async_trait;
/// Repository for managing cached image URL mappings.
#[async_trait]
pub trait ImageCacheRepository: Send + Sync {
async fn get_from_redis(&self, key: &str) -> Option<String>;
async fn set_in_redis(&self, key: &str, value: &str, ttl: u64) -> Result<(), String>;
async fn get_from_db(&self, original_url: &str) -> Result<Option<String>, String>;
async fn save_to_db(&self, original_url: &str, cdn_url: &str) -> Result<(), String>;
async fn find_original_from_cdn(&self, cdn_url: &str) -> Result<Option<String>, String>;
async fn delete_from_db(&self, original_url: &str) -> Result<(), String>;
async fn delete_from_redis(&self, key: &str) -> Result<(), String>;
async fn get_lock(&self, key: &str) -> bool;
async fn set_lock(&self, key: &str, ttl: u64) -> Result<(), String>;
async fn release_lock(&self, key: &str) -> Result<(), String>;
async fn invalidate_api_caches(&self, patterns: Vec<&str>) -> Result<(), String>;
}
-2
View File
@@ -1,5 +1,3 @@
pub mod image_cache;
pub mod scraping;
pub use image_cache::ImageCacheRepository;
pub use scraping::ScrapingRepository;