Cache Functions
[mod_cache]


型定義

typedef cache_cache_t cache_cache_t
typedef void cache_cache_inc_frequency (void *a)
typedef apr_size_t cache_cache_get_size (void *a)
typedef const char * cache_cache_get_key (void *a)
typedef void cache_cache_free (void *a)

関数

cache_cache_tcache_init (int max_entries, apr_size_t max_size, cache_pqueue_get_priority get_pri, cache_pqueue_set_priority set_pri, cache_pqueue_getpos get_pos, cache_pqueue_setpos set_pos, cache_cache_inc_frequency *inc_entry, cache_cache_get_size *size_entry, cache_cache_get_key *key_entry, cache_cache_free *free_entry)
void cache_free (cache_cache_t *c)
void * cache_find (cache_cache_t *c, const char *key)
void cache_update (cache_cache_t *c, void *entry)
void cache_insert (cache_cache_t *c, void *entry)
void * cache_pop (cache_cache_t *c)
apr_status_t cache_remove (cache_cache_t *c, void *entry)

型定義

typedef void cache_cache_free(void *a)

callback to free an entry

typedef const char* cache_cache_get_key(void *a)

callback to get the key of a item

typedef apr_size_t cache_cache_get_size(void *a)

callback to get the size of a item

typedef void cache_cache_inc_frequency(void *a)

callback to increment the frequency of a item

typedef struct cache_cache_t cache_cache_t

ADT for the cache


関数

void* cache_find ( cache_cache_t c,
const char *  key 
)

find a entry in the cache, incrementing the frequency if found

引数:
c the cache
key the key

void cache_free ( cache_cache_t c  ) 

free up the cache

引数:
c the cache

cache_cache_t* cache_init ( int  max_entries,
apr_size_t  max_size,
cache_pqueue_get_priority  get_pri,
cache_pqueue_set_priority  set_pri,
cache_pqueue_getpos  get_pos,
cache_pqueue_setpos  set_pos,
cache_cache_inc_frequency inc_entry,
cache_cache_get_size size_entry,
cache_cache_get_key key_entry,
cache_cache_free free_entry 
)

initialize the cache ADT

引数:
max_entries the number of entries in the cache
max_size the size of the cache
get_pri callback to get a priority of a entry
set_pri callback to set a priority of a entry
get_pos callback to get the position of a entry in the cache
set_pos callback to set the position of a entry in the cache
inc_entry callback to increment the frequency of a entry
size_entry callback to get the size of a entry
key_entry callback to get the key of a entry
free_entry callback to free an entry

void cache_insert ( cache_cache_t c,
void *  entry 
)

insert a entry into the cache

引数:
c the cache
entry the entry

void* cache_pop ( cache_cache_t c  ) 

pop the lowest priority item off

引数:
c the cache
戻り値:
the entry or NULL

apr_status_t cache_remove ( cache_cache_t c,
void *  entry 
)

remove an item from the cache

引数:
c the cache
entry the actual entry (from a find)

void cache_update ( cache_cache_t c,
void *  entry 
)

insert a entry into the cache

引数:
c the cache
entry the entry


Apacheに対してSun Jul 19 22:05:28 2009に生成されました。  doxygen 1.4.7