Redis Key Cleaner

build workflow License: MIT

This application is used to set the expiry of Redis keys based on a given pattern and time-to-live (TTL) value.

Requirements

Configuration

The application can be configured by command line flags, environment variables and in a yaml formatted configuration file.

Common line flags

Environment variables

The following environment variables can be set in .env (or provided from your environment):

config.yaml

Sample

yaml - name: My Custom keys pattern: "{my-custom}*" ttlSeconds: 86400 batch: 100000 - name: My Custom another keys pattern: "{my-custom-another}*" ttlSeconds: 129600 batch: 100000

Usage

First create a .env file and fill its values. (It can be created based on .env.template)

cargo run -- --dry-run --config config.yaml