class

Fetcher::PeriodicCleanupHandle

Inherits Reference < Object

One-shot PeriodicCleanup registration handle. Stores a cleanup proc and ensures it's registered exactly once. Provides unregister for graceful shutdown.

Eliminates the repeated @cleanup_proc / @cleanup_registered / register_cleanup_once pattern across store classes.

Instance methods

register

Register a cleanup proc exactly once. No-op if already registered. Thread-safe: PeriodicCleanup.register_cleanup handles its own locking.

Source
unregister

Unregister the cleanup proc. No-op if not registered. Used for graceful shutdown (e.g., CacheStore.close).

Source