MCPcopy Create free account
hub / github.com/Moosync/Moosync / get_cache_state

Function get_cache_state

src-tauri/src/db/mod.rs:71–80  ·  view source on GitHub ↗
(app: &mut App)

Source from the content-addressed store, hash-verified

69
70#[tracing::instrument(level = "debug", skip(app))]
71pub fn get_cache_state(app: &mut App) -> CacheHolder {
72 let path = app.path().app_cache_dir().unwrap().join("http_cache.db");
73 if let Some(parent) = path.parent() {
74 if !parent.exists() {
75 fs::create_dir_all(parent).unwrap();
76 }
77 }
78
79 CacheHolder::new(path)
80}
81
82#[tracing::instrument(level = "debug", skip(app))]
83pub fn get_db_state(app: &mut App) -> Database {

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected