GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cli/internal/resourcecache/cache_test.go at main · PastureStack/cli Expand file tree/ Copy pathcache_test.goMore file actions 18 lines (16 loc) · 466 Bytes / Copy pathcache_test.goFile metadata and controls18 lines (16 loc) · 466 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 package resourcecache import ( "testing" "time" ) func TestSetGetAndExpire(t *testing.T) { cache := New(5 * time.Millisecond) cache.Set("resource:1", "value") if value, ok := cache.Get("resource:1"); !ok || value != "value" { t.Fatalf("unexpected cache read: value=%v ok=%v", value, ok) } time.Sleep(10 * time.Millisecond) if value, ok := cache.Get("resource:1"); ok || value != nil { t.Fatalf("expired value remained: value=%v ok=%v", value, ok) } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |