MCPcopy Create free account
hub / github.com/Sompote/TigrimOSR / remote_cache_set

Function remote_cache_set

src/server/data.rs:74–81  ·  view source on GitHub ↗
(key: &str, data: String, ttl_secs: u64)

Source from the content-addressed store, hash-verified

72}
73
74fn remote_cache_set(key: &str, data: String, ttl_secs: u64) {
75 if let Ok(mut cache) = remote_cache().lock() {
76 cache.insert(key.to_string(), CacheEntry {
77 data,
78 expires: std::time::Instant::now() + std::time::Duration::from_secs(ttl_secs),
79 });
80 }
81}
82
83pub fn remote_cache_clear() {
84 if let Some(cache) = REMOTE_CACHE.get() {

Callers 1

remote_fetch_and_cacheFunction · 0.85

Calls 1

remote_cacheFunction · 0.85

Tested by

no test coverage detected