Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: domain cache #855

Merged
merged 2 commits into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions common/cache/domainCache.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ import (

const (
domainCacheInitialSize = 10 * 1024
domainCacheMaxSize = 16 * 1024
domainCacheTTL = time.Hour
domainCacheMaxSize = 64 * 1024
domainCacheTTL = 0 // 0 means infinity
domainCacheEntryTTL = 20 * time.Second
domainCacheRefreshInterval = 10 * time.Second
domainCacheRefreshPageSize = 100

Expand Down Expand Up @@ -364,7 +365,7 @@ func (c *domainCache) updateIDToDomainCache(id string, record *DomainCacheEntry)
entry.isGlobalDomain = record.isGlobalDomain
entry.failoverNotificationVersion = record.failoverNotificationVersion
entry.notificationVersion = record.notificationVersion
entry.expiry = c.timeSource.Now().Add(domainCacheRefreshInterval)
entry.expiry = c.timeSource.Now().Add(domainCacheEntryTTL)

nextDomain := entry.duplicate()
if triggerCallback {
Expand Down