Cache Configuration
monetr requires the ability to cache some data temporarily in order to reduce outgoing API calls to things like Plaid or to have some basic shared state between requests for things like Proof-of-work. To do this monetr supports using an external cache such as Valkey or any Redis-compatible server, or it will fall back to an internal LRU cache that is specific to that single instance of monetr.
If you are running more than one instance of monetr you should configure a Valkey server for all of the instances to share so that way shared-state cached data can be accessed to prevent odd bugs.
At the moment monetr still supports the Redis configuration block, but this will be deprecated in the future.
If your cache.kind value is unset monetr will fallback to the redis configuration instead for now. But this will
break in an upcoming release and will instead default to memory if you do not update your configuration.
The following environment variables map to the following configuration file fields. Each field is documented below.
Memory
When memory is specified as the cache implementation, monetr will cache data in it's own memory. This data does not
persist between server restarts which means that things like proof of work data for a login session might get lost in a
server restart. This is the preferred and recommended cache implementation for self-hosting. However you should only use
this if you are running a single monetr server.
monetr's internal cache is an LRU, so if the max number of items is reached then the least recently used items will be evicted first from the cache.
Valkey
monetr can work with any Redis-compatible server, however Valkey is recommended and is provided in the docker compose monetr distributes for self-hosted installations.
monetr watches the certificate files for changes, so certificates can be rotated without restarting the server. New connections to the cache server will use the new certificates right away.
The following environment variables map to the following configuration file fields. Each field is documented below.