Skip to main content

Module config

Module config 

Source
Expand description

Configuration for the asset cache subsystem.

Mirrors the [assets] section of devboy.toml and provides human-readable parsers for sizes (e.g. "1Gi") and durations (e.g. "7d").

Structs§

AssetConfig
Raw configuration as loaded from devboy.toml.
ResolvedAssetConfig
Fully validated asset configuration with parsed values.

Enums§

EvictionPolicy
Eviction strategy applied by the rotator when the cache is over budget.

Constants§

DEFAULT_MAX_CACHE_SIZE
Default cache size limit: 1 GiB.
DEFAULT_MAX_FILE_AGE
Default maximum file age before LRU eviction kicks in: 7 days.

Functions§

default_cache_dir
Default cache directory used when the user did not configure one.
expand_path
Expand a user-provided path — supports leading ~ and $HOME only.
parse_duration
Parse a human-readable duration such as "7d", "24h", "30m", "45s".
parse_size
Parse a human-readable size string into a byte count.