MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / disable_caching

Method disable_caching

src/secrets/src/cache.rs:129–138  ·  view source on GitHub ↗

Disables caching, returning whether we were previously enabled.

(&self)

Source from the content-addressed store, hash-verified

127
128 /// Disables caching, returning whether we were previously enabled.
129 fn disable_caching(&self) -> bool {
130 // Disable and clear the cache of all existing values.
131 let was_enabled = self.policy.set_enabled(false);
132 self.cache
133 .write()
134 .expect("CachingSecretsReader panicked!")
135 .clear();
136
137 was_enabled
138 }
139
140 /// Sets a new "time to live" for cache values, returning the old TTL.
141 fn set_ttl(&self, ttl: Duration) -> Duration {

Callers 2

set_policyMethod · 0.80
test_disabling_cacheFunction · 0.80

Calls 4

set_enabledMethod · 0.80
expectMethod · 0.80
clearMethod · 0.45
writeMethod · 0.45

Tested by 1

test_disabling_cacheFunction · 0.64