Skip to content

Commit

Permalink
Add a configurable identity cache size to the relay (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvolp12 authored Sep 8, 2024
2 parents 5ea1281 + 6da607c commit 58e6cb4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/bigsky/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ func run(args []string) error {
EnvVars: []string{"RELAY_MAX_QUEUE_PER_PDS"},
Value: 1_000,
},
&cli.IntFlag{
Name: "did-cache-size",
EnvVars: []string{"RELAY_DID_CACHE_SIZE"},
Value: 5_000_000,
},
}

app.Action = runBigsky
Expand Down Expand Up @@ -312,7 +317,7 @@ func runBigsky(cctx *cli.Context) error {
}
mr.AddHandler("web", &webr)

cachedidr := plc.NewCachingDidResolver(mr, time.Hour*24, 500_000)
cachedidr := plc.NewCachingDidResolver(mr, time.Hour*24, cctx.Int("did-cache-size"))

kmgr := indexer.NewKeyManager(cachedidr, nil)

Expand Down

0 comments on commit 58e6cb4

Please sign in to comment.