Rename http-server -> radicle-httpd

So that the directory name matches the crate name.
This commit is contained in:
Rūdolfs Ošiņš
2024-06-20 11:44:44 +02:00
parent 05632a15d7
commit 2f1a5dcdfe
44 changed files with 13 additions and 13 deletions
+22
View File
@@ -0,0 +1,22 @@
use std::num::NonZeroUsize;
use std::sync::Arc;
use lru::LruCache;
use tokio::sync::Mutex;
use radicle::prelude::RepoId;
use radicle_surf::Oid;
#[derive(Clone)]
pub struct Cache {
pub tree: Arc<Mutex<LruCache<(RepoId, Oid, String), serde_json::Value>>>,
}
impl Cache {
/// Creates a new cache of the given size.
pub fn new(size: NonZeroUsize) -> Self {
Cache {
tree: Arc::new(Mutex::new(LruCache::new(size))),
}
}
}