Does Laminas Filesystem Cache Return Expired Values Without the ExpiredValues Plugin?
0 reputation · 11 Jun 2020, 01:46 UTC
Goal: Ensure that a Laminas Cache instance never returns a value after its configured lifetime has elapsed.
Uncertainty: The Filesystem adapter reports that it does not support the automatic_cleaning capability, and its garbage‑collection of expired files occurs only on write operations unless a cache_clean_callback is defined. It is unclear whether the adapter will serve stale data on a read‑heavy workload when the ExpiredValues plugin is not present in the plugin stack.
Questions:
- Does the Filesystem adapter automatically remove expired entries during a get operation when the ExpiredValues plugin is not enabled?
- Is enabling the ExpiredValues plugin the only reliable way to guarantee that expired values are never returned?
- If automatic_cleaning is unavailable, what configuration options (e.g., cache_clean_callback) can be used to trigger cleanup on read operations?