Commit 22055c07 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Add some more notes about TimedCache.

parent 19ab9e27
...@@ -16,7 +16,9 @@ type cacheEntry struct { ...@@ -16,7 +16,9 @@ type cacheEntry struct {
} }
// TimedIntCache caches the result of fetch() for some time. It is // TimedIntCache caches the result of fetch() for some time. It is
// thread-safe. // thread-safe. Calls of fetch() do no happen inside a critical
// section, so when multiple concurrent Get()s happen for the same
// key, multiple fetch() calls may be issued for the same key.
type TimedCache struct { type TimedCache struct {
fetch func(name string) interface{} fetch func(name string) interface{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment