diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-05-06 15:33:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 15:33:34 +0200 |
commit | 6493c0c0f23bb930cc8a2ce071a66b7d4b5ec9eb (patch) | |
tree | ad4beb518a4f25542b0dcebe7e8efc95220c337c /syncapi/syncapi.go | |
parent | 507f63d0fc8158f200f3e29fd36e5f09c83e62db (diff) |
Move LL cache (#2429)
Diffstat (limited to 'syncapi/syncapi.go')
-rw-r--r-- | syncapi/syncapi.go | 8 |
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, ) } |