Transform the podCache into a write-through cache.

Don't always clear podInfo, instead occasionally garbage collect.
This commit is contained in:
Brendan Burns
2015-01-28 22:15:23 -08:00
parent ca6de16df7
commit 3624b65f1c
3 changed files with 102 additions and 12 deletions

View File

@@ -352,6 +352,7 @@ func (m *Master) init(c *Config) {
m.podRegistry,
)
go util.Forever(func() { podCache.UpdateAllContainers() }, time.Second*30)
go util.Forever(func() { podCache.GarbageCollectPodStatus() }, time.Minute*30)
// TODO: Factor out the core API registration
m.storage = map[string]apiserver.RESTStorage{