glimr/cache/file/pool

File Cache Pool

Provides a pool type for file-based caching. The pool holds the cache directory path and provides a consistent API with other cache drivers like Redis.

Types

Opaque pool type that wraps the cache directory path. Provides API consistency with connection-pooled drivers like Redis.

pub opaque type Pool

Values

pub fn get_path(pool: Pool) -> String

Returns the base path for this cache pool. Used internally by cache operations to construct file paths for cached entries.

pub fn start_pool(store: driver.CacheStore) -> Pool

Creates a new file cache pool from a FileStore configuration. Panics if called with a non-FileStore. Use the file.start function for a safer entry point.

pub fn stop_pool(pool: Pool) -> Nil

Stops the pool. For file cache this is a no-op since there are no connections to close, but it provides API consistency with connection-pooled drivers.

Search Document