Manages a cache of search results to avoid redundant database queries while
keeping memory usage under control.
Usage
cache_manage(
operation,
key = NULL,
value = NULL,
max_size = 500,
max_items = 50
)
Arguments
- operation
Operation to perform ("add", "get", "clear", "status")
- key
Cache key (usually search query)
- value
Value to cache (for "add" operation)
- max_size
Maximum cache size in MB (default: 500)
- max_items
Maximum number of items to cache (default: 50)
Value
Varies by operation