The libcache API provides UNIX-level support for caching using purgeable memory. This arrangement allows the kernel to manage cache availability systemwide based on available memory. This maximizes the performance advantage of the cache by allowing the application to grow its cache as desired (without unnecessary restriction of the cache size) while simultaneously preventing the caches from growing so large that they degrade performance due to excessive paging.