160
replicationResolverFactory namespace.ReplicationResolverFactory,
161
namespaceStateChangedFn namespace.NamespaceStateChangedFn,
163
>
return ®istry{
164
>
persistence: aPersistence,
165
>
globalNamespacesEnabled: enableGlobalNamespaces,
166
>
currentClusterName: currentClusterName,
167
>
clock: clock.NewRealTimeSource(),
168
>
metricsHandler: metricsHandler.WithTags(metrics.OperationTag(metrics.NamespaceCacheScope)),
169
>
logger: logger,
170
>
nameToID: make(map[namespace.Name]namespace.ID),
171
>
idToNamespace: make(map[namespace.ID]*namespace.Namespace),
172
>
refreshInterval: refreshInterval,
173
>
readthroughNotFoundCache: cache.New(readthroughCacheSize, &readthroughNotFoundCacheOpts),
174
>
175
>
forceSearchAttributesCacheRefreshOnRead: forceSearchAttributesCacheRefreshOnRead,
176
>
replicationResolverFactory: replicationResolverFactory,
177
>
namespaceStateChangedFn: namespaceStateChangedFn,
178
>
}
179
>
}
180
181
// DefaultNamespaceStateChanged is the default implementation that checks whether a namespace