Concord.TTL (Concord v2.0.0)

Copy Markdown View Source

TTL (Time-To-Live) management for Concord.

This module provides periodic cleanup of expired keys and configuration management for TTL-related settings.

Summary

Functions

Calculates the expiration timestamp for a given TTL in seconds.

Returns a specification to start this module under a supervisor.

Triggers an immediate cleanup of expired keys.

Gets the current TTL configuration.

Updates the cleanup interval.

Validates a TTL value.

Functions

calculate_expiration(ttl_seconds)

Calculates the expiration timestamp for a given TTL in seconds.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

cleanup_now()

Triggers an immediate cleanup of expired keys.

config()

Gets the current TTL configuration.

start_link(opts \\ [])

update_cleanup_interval(interval_seconds)

Updates the cleanup interval.

validate_ttl(ttl)

Validates a TTL value.