dgraph-io / ristretto

A high performance memory-bound Go cache
https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/
Apache License 2.0
5.54k stars 364 forks source link

`feat(configurable cleanup ticker)`: add config for cleanup ticker duration #342

Closed singhvikash11 closed 1 year ago

singhvikash11 commented 1 year ago

Problem

Cleanup ticker to remove entries for expired keys taking a lot of CPU cycles around 90% in the case of pod with 1.6 CPU

Solution

Making the duration of the cleanup ticker configurable so users can configure it to higher values and can save on CPU cycles.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

singhvikash11 commented 1 year ago

@joshua-goldstein can you please review the pr, I want to use this library as app-cache in prod.

singhvikash11 commented 1 year ago

@akon-dey can you please review the pr