| libgutenprint API Reference 5.3.5
    | 
A simple reference cache. More...
#include <gutenprint/string-list.h>| Functions | |
| int | stp_refcache_create (const char *name) | 
| Create a new object cache. | |
| void * | stp_refcache_find_item (const char *cache, const char *item) | 
| Find an item in a cache. | |
| int | stp_refcache_add_item (const char *cache, const char *item, void *data) | 
| Add an item to a cache. | |
| void | stp_refcache_remove_item (const char *cache, const char *item) | 
| Remove an item from cache. | |
| void | stp_refcache_replace_item (const char *cache, const char *item, void *data) | 
| Replace an item's data, or add if it doesn't exist. | |
| void | stp_refcache_destroy (const char *cache) | 
| Destroy a cache. | |
| const stp_string_list_t * | stp_refcache_list_caches (void) | 
| Return a static list of all caches in existence. | |
| const stp_string_list_t * | stp_refcache_list_cache_items (const char *cache) | 
| Return a static list of items in a specified cache. | |
A simple reference cache.
| 
 | extern | 
Add an item to a cache.
| cache | the cache to use or create. | 
| item | the name of the item to cache | 
| data | pointer to the data item to store | 
| 
 | extern | 
Create a new object cache.
| name | The name of the cache to create | 
| 
 | extern | 
Destroy a cache.
The individual items are not freed. If cache does not exist this is a no-op.
| cache | the cache to destroy. | 
| 
 | extern | 
Find an item in a cache.
| cache | the cache to use. | 
| item | the name of the item to cache | 
| 
 | extern | 
Return a static list of items in a specified cache.
| cache | name of cache | 
| 
 | extern | 
Return a static list of all caches in existence.
| 
 | extern | 
Remove an item from cache.
The item's data is not freed. If cache or item does not exist this is a no-op.
| cache | the cache to use. | 
| item | the name of the item to remove from cache | 
| 
 | extern | 
Replace an item's data, or add if it doesn't exist.
The old data (if any) is not freed. Fails if cache does not already exist.
| cache | the cache to use. | 
| item | the name of the item to add/update. | 
| data | the data to be added/updated for the cached item. |