PingAccess Agent SDK for C
|
Go to the source code of this file.
Functions | |
apr_status_t | paa_cache_standalone_create (apr_pool_t *pool, const paa_config *config, const paa_cache **impl) |
Header for the paa_cache standalone implementation.
apr_status_t paa_cache_standalone_create | ( | apr_pool_t * | pool, |
const paa_config * | config, | ||
const paa_cache ** | impl | ||
) |
Creates an instance of a standalone cache.
This cache implementation does not perform any IPC to PingAccess agents in other processes (local or remote). It is multithread-safe and uses a configurable number of background threads to manage the cache.
The cache partitions management of entries across the background threads so each background thread has exclusive access to the data it manages in the cache. Using this approach, each background thread effectively manages its own cache.
When bounded, the cache evicts entries in LRU order once the configured maximum number of entries is reached. Eviction will bring the total number of entries below a configured high watermark.
Regardless of bound, the cache will also periodically sweep for stale entries, governed by a configurable search interval and a token search limit.
This implementation expects the following keys from the configuration:
pool | the pool in which to allocate the structure |
config | the configuration used to configure the implementation |
impl | the output, populated on success |