Skip to content

Configurable maximum size for the in-memory cache #1250

Open
@dadrus

Description

Preflight checklist

Describe the background of your feature request

As of today, the in-memory cache does not support any type of configuration and as such does not allow specifying how much memory it is allowed to use. That limitation can lead to situations in which the entire available memory for the heimdall process is consumed. The probabilty for such situations is pretty low due to ttls of cache entries and their size. Nevevertheless it is not zero and is heigher in containerised environments with constrained memory.

Describe your idea

Allow configuration of the available in-memory cache size, e.g. like shown below

cache:
  type: in-memory
  config:
    capacity: 128MB

In addition, limit the availability memory capacity by default to a usable size.

Are there any workarounds or alternatives?

No.

Version

v0.13.0-alpha

Additional Context

The currently used cache library does not support configuring the cache size in MB, only the capacity in number of entries. So, there is a need for a PR to that project first.

Metadata

Assignees

No one assigned

    Labels

    featureUsed for new features

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions