Asterisk - The Open Source Telephony Project  18.5.0
Data Fields
sorcery_memory_cache Struct Reference

Structure for storing a memory cache. More...

Collaboration diagram for sorcery_memory_cache:
Collaboration graph
[legend]

Data Fields

unsigned int cache_completed
 Variable that is set when the cache has reached empty. More...
 
unsigned int cache_notify
 Variable used to indicate we should notify a test when we reach empty. More...
 
ast_cond_t cond
 Condition used for signaling when the cache has reached empty. More...
 
unsigned int del_expire:1
 
int expire_id
 Scheduler item for expiring oldest object. More...
 
unsigned int expire_on_reload
 Whether all objects are expired when the object type is reloaded, 0 if disabled. More...
 
unsigned int full_backend_cache
 Whether this is a cache of the entire backend, 0 if disabled. More...
 
ast_mutex_t lock
 Mutex lock used for signaling when the cache has reached empty. More...
 
unsigned int maximum_objects
 The maximum number of objects permitted in the cache, 0 if no limit. More...
 
char * name
 The name of the memory cache. More...
 
struct ast_heapobject_heap
 Heap of cached objects. Oldest object is at the top. More...
 
unsigned int object_lifetime_maximum
 The maximum time (in seconds) an object will stay in the cache, 0 if no limit. More...
 
unsigned int object_lifetime_stale
 The amount of time (in seconds) before an object is marked as stale, 0 if disabled. More...
 
char * object_type
 The type of object we are caching. More...
 
struct ao2_containerobjects
 Objects in the cache. More...
 
const struct ast_sorcerysorcery
 An unreffed pointer to the sorcery instance, accessible only with lock held. More...
 
int stale_update_sched_id
 scheduler id of stale update task More...
 

Detailed Description

Structure for storing a memory cache.

Definition at line 127 of file res_sorcery_memory_cache.c.

Field Documentation

◆ cache_completed

unsigned int cache_completed

Variable that is set when the cache has reached empty.

Definition at line 162 of file res_sorcery_memory_cache.c.

Referenced by AST_TEST_DEFINE(), and schedule_cache_expiration().

◆ cache_notify

unsigned int cache_notify

Variable used to indicate we should notify a test when we reach empty.

Definition at line 156 of file res_sorcery_memory_cache.c.

Referenced by AST_TEST_DEFINE().

◆ cond

ast_cond_t cond

Condition used for signaling when the cache has reached empty.

Definition at line 160 of file res_sorcery_memory_cache.c.

Referenced by AST_TEST_DEFINE(), and schedule_cache_expiration().

◆ del_expire

unsigned int del_expire

TRUE if trying to stop the oldest object expiration scheduler item.

Definition at line 153 of file res_sorcery_memory_cache.c.

Referenced by expire_objects_from_cache(), remove_all_from_cache(), and schedule_cache_expiration().

◆ expire_id

int expire_id

Scheduler item for expiring oldest object.

Definition at line 145 of file res_sorcery_memory_cache.c.

Referenced by add_to_cache(), expire_objects_from_cache(), remove_all_from_cache(), schedule_cache_expiration(), and sorcery_memory_cache_open().

◆ expire_on_reload

unsigned int expire_on_reload

Whether all objects are expired when the object type is reloaded, 0 if disabled.

Definition at line 139 of file res_sorcery_memory_cache.c.

Referenced by sorcery_memory_cache_open(), sorcery_memory_cache_reload(), and sorcery_memory_cache_show().

◆ full_backend_cache

unsigned int full_backend_cache

◆ lock

Mutex lock used for signaling when the cache has reached empty.

Definition at line 158 of file res_sorcery_memory_cache.c.

Referenced by AST_TEST_DEFINE(), and schedule_cache_expiration().

◆ maximum_objects

unsigned int maximum_objects

The maximum number of objects permitted in the cache, 0 if no limit.

Definition at line 133 of file res_sorcery_memory_cache.c.

Referenced by AST_TEST_DEFINE(), load_module(), memory_cache_populate(), sorcery_memory_cache_create(), sorcery_memory_cache_open(), sorcery_memory_cache_show(), stale_cache_update(), and unload_module().

◆ name

char* name

◆ object_heap

struct ast_heap* object_heap

◆ object_lifetime_maximum

unsigned int object_lifetime_maximum

◆ object_lifetime_stale

unsigned int object_lifetime_stale

◆ object_type

char* object_type

◆ objects

struct ao2_container* objects

◆ sorcery

const struct ast_sorcery* sorcery

◆ stale_update_sched_id

int stale_update_sched_id

scheduler id of stale update task

Definition at line 147 of file res_sorcery_memory_cache.c.

Referenced by memory_cache_stale_update_full(), sorcery_memory_cache_open(), and stale_cache_update().


The documentation for this struct was generated from the following file: