aboutsummaryrefslogtreecommitdiff
path: root/syncapi/syncapi.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-05-06 15:33:34 +0200
committerGitHub <noreply@github.com>2022-05-06 15:33:34 +0200
commit6493c0c0f23bb930cc8a2ce071a66b7d4b5ec9eb (patch)
treead4beb518a4f25542b0dcebe7e8efc95220c337c /syncapi/syncapi.go
parent507f63d0fc8158f200f3e29fd36e5f09c83e62db (diff)
Move LL cache (#2429)
Diffstat (limited to 'syncapi/syncapi.go')
-rw-r--r--syncapi/syncapi.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/syncapi/syncapi.go b/syncapi/syncapi.go
index 686e2044..6da8ce6d 100644
--- a/syncapi/syncapi.go
+++ b/syncapi/syncapi.go
@@ -53,12 +53,8 @@ func AddPublicRoutes(
}
eduCache := caching.NewTypingCache()
- lazyLoadCache, err := caching.NewLazyLoadCache()
- if err != nil {
- logrus.WithError(err).Panicf("failed to create lazy loading cache")
- }
notifier := notifier.NewNotifier()
- streams := streams.NewSyncStreamProviders(syncDB, userAPI, rsAPI, keyAPI, eduCache, lazyLoadCache, notifier)
+ streams := streams.NewSyncStreamProviders(syncDB, userAPI, rsAPI, keyAPI, eduCache, base.Caches, notifier)
notifier.SetCurrentPosition(streams.Latest(context.Background()))
if err = notifier.Load(context.Background(), syncDB); err != nil {
logrus.WithError(err).Panicf("failed to load notifier ")
@@ -146,6 +142,6 @@ func AddPublicRoutes(
routing.Setup(
base.PublicClientAPIMux, requestPool, syncDB, userAPI,
- rsAPI, cfg, lazyLoadCache,
+ rsAPI, cfg, base.Caches,
)
}