Skip to content

Commit

Permalink
Change cache log level from trace to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Jul 22, 2022
1 parent 50a9f0d commit 6fb9a5c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::path::Path;
use std::time::Duration;

use moka::future::Cache as MokaCache;
use tracing::trace;
use tracing::debug;

use crate::drive::AliyunFile;

Expand All @@ -21,18 +21,18 @@ impl Cache {
}

pub fn get(&self, key: &str) -> Option<Vec<AliyunFile>> {
trace!(key = %key, "cache: get");
debug!(key = %key, "cache: get");
self.inner.get(key)
}

pub async fn insert(&self, key: String, value: Vec<AliyunFile>) {
trace!(key = %key, "cache: insert");
debug!(key = %key, "cache: insert");
self.inner.insert(key, value).await;
}

pub async fn invalidate(&self, path: &Path) {
let key = path.to_string_lossy().into_owned();
trace!(path = %path.display(), key = %key, "cache: invalidate");
debug!(path = %path.display(), key = %key, "cache: invalidate");
self.inner.invalidate(&key).await;
}

Expand All @@ -43,7 +43,7 @@ impl Cache {
}

pub fn invalidate_all(&self) {
trace!("cache: invalidate all");
debug!("cache: invalidate all");
self.inner.invalidate_all();
}
}

0 comments on commit 6fb9a5c

Please sign in to comment.