MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / set_cached

Function set_cached

crates/opencode-config/src/wellknown.rs:151–164  ·  view source on GitHub ↗
(url: String, config: Config)

Source from the content-addressed store, hash-verified

149}
150
151fn set_cached(url: String, config: Config) {
152 let mut guard = match CACHE.lock() {
153 Ok(g) => g,
154 Err(_) => return,
155 };
156 let map = guard.get_or_insert_with(HashMap::new);
157 map.insert(
158 url,
159 CacheEntry {
160 config,
161 fetched_at: Instant::now(),
162 },
163 );
164}
165
166/// Clears the wellknown config cache. Useful for testing or forced refresh.
167pub fn clear_cache() {

Callers 2

load_wellknownFunction · 0.85

Calls

no outgoing calls

Tested by 1