MCPcopy Create free account
hub / github.com/devfeel/dotweb / TestRuntimeCache_Delete

Function TestRuntimeCache_Delete

cache/runtime/cache_runtime_test.go:95–109  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestRuntimeCache_Delete(t *testing.T) {
96 cache := NewRuntimeCache()
97 cache.Set(TESTCacheKey, TESTCacheValue, 2)
98
99 value, e := cache.Get(TESTCacheKey)
100
101 test.Nil(t, e)
102 test.Equal(t, TESTCacheValue, value)
103
104 cache.Delete(TESTCacheKey)
105
106 value, e = cache.Get(TESTCacheKey)
107 test.Nil(t, e)
108 test.Nil(t, value)
109}
110
111func TestRuntimeCache_ClearAll(t *testing.T) {
112 cache := NewRuntimeCache()

Callers

nothing calls this directly

Calls 6

SetMethod · 0.95
GetMethod · 0.95
DeleteMethod · 0.95
NilFunction · 0.92
EqualFunction · 0.92
NewRuntimeCacheFunction · 0.70

Tested by

no test coverage detected