Skip to content

Expirable Cache TTL with Jitter #203

@Warfields

Description

@Warfields

Feature Request

Add a configurable jitter timing to the expirable cache.

Issue

Image

I use the expirable cache to cache results from a DB, which is great! What's not so great is whenever I restart or redeploy the service there's a large amount of gong ringing from the initial filling of the cache. There are several ways of dealing with this:

  1. I could make worker pool on my client that limits the RPS of my service. (Probably the right answer for me)
  2. Add a random jitter to the expiration timing

I'm willing to write the PR for the new jitter cache, I would like to know if that's a feature the maintainers are even interested in that functionality before I spend time implementing it.

Options

If interested there are several ways the new functionality could be designed. For instance should the jitter only add to the TTL, remove, or both? Should that be configurable?

  1. +/- x
  2. + x
  3. - x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions