libcache man page on Darwin

Man page or keyword search:  
man Server   23457 pages
apropos Keyword Search (all sections)
Output format
Darwin logo
[printable version]

libcache(3)		 BSD Library Functions Manual		   libcache(3)

NAME
     libcache — the caching framework

SYNOPSIS
     #include <cache.h>

DESCRIPTION
     The libcache framework provides a facility for creating in memory data
     caches.  Each cache is a mutable dictionary that associates values with
     their keys.  A cache limits the number of values it keeps according to
     available system memory and selects values to evict when the limit is
     exceeded.	Recently and frequently used values are less likely to be
     selected for eviction.

     Cache keys and values should be cast as pointers.	The framework provides
     a callback interface for supporting arbitrary types of keys and values
     and implements callback functions for common types.  See
     cache_callbacks(3) for more information.

     Clients retrieve a value previously added to a cache using the value's
     key.  When the client gets a value, the cache increments a reference
     count on the value.  When the client finishes with a value retrieved from
     a cache they must release the value back to the cache.  Referenced values
     are considered in use and will not be evicted.  The cache may evict
     unreferenced values (e.g. to make room for other values or reduce its
     size).

     The number of values allowed in a cache at one time is managed by the
     cache framework.  Cache size will grow when the system has available mem‐
     ory and shrink under memory pressure.

     Libcache is thread-safe.  It is not safe to call back into the cache API
     from cache callback functions.

SEE ALSO
     cache_create(3), cache_set_and_retain(3)

Darwin				  May 7, 2009				Darwin
[top]

List of man pages available for Darwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net