Asterisk - The Open Source Telephony Project
18.5.0
|
Structure for storing a memory cache. More...
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_heap * | object_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_container * | objects |
Objects in the cache. More... | |
const struct ast_sorcery * | sorcery |
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... | |
Structure for storing a memory cache.
Definition at line 127 of file res_sorcery_memory_cache.c.
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().
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().
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().
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().
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().
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().
unsigned int full_backend_cache |
Whether this is a cache of the entire backend, 0 if disabled.
Definition at line 141 of file res_sorcery_memory_cache.c.
Referenced by add_to_cache(), memory_cache_full_update(), memory_cache_stale_check_object(), sorcery_memory_cache_ami_expire_object(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_close(), sorcery_memory_cache_expire(), sorcery_memory_cache_open(), sorcery_memory_cache_populate(), sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), sorcery_memory_cache_retrieve_regex(), and sorcery_memory_cached_object_alloc().
ast_mutex_t 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().
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().
char* name |
The name of the memory cache.
Definition at line 129 of file res_sorcery_memory_cache.c.
Referenced by PathSegment::get_child(), Parameter::load(), SwaggerType::load(), Property::load(), memory_cache_populate(), sorcery_memory_cache_close(), sorcery_memory_cache_cmp(), sorcery_memory_cache_complete_name(), sorcery_memory_cache_destructor(), sorcery_memory_cache_dump(), sorcery_memory_cache_hash(), sorcery_memory_cache_load(), sorcery_memory_cache_open(), sorcery_memory_cache_show(), sorcery_memory_cached_object_hash(), stale_cache_update(), and stale_item_update().
struct ast_heap* object_heap |
Heap of cached objects. Oldest object is at the top.
Definition at line 143 of file res_sorcery_memory_cache.c.
Referenced by add_to_cache(), expire_objects_from_cache(), memory_cache_stale_check(), remove_all_from_cache(), remove_from_cache(), remove_oldest_from_cache(), schedule_cache_expiration(), sorcery_memory_cache_destructor(), and sorcery_memory_cache_open().
unsigned int object_lifetime_maximum |
The maximum time (in seconds) an object will stay in the cache, 0 if no limit.
Definition at line 135 of file res_sorcery_memory_cache.c.
Referenced by AST_TEST_DEFINE(), expire_objects_from_cache(), schedule_cache_expiration(), sorcery_memory_cache_close(), sorcery_memory_cache_dump(), sorcery_memory_cache_open(), sorcery_memory_cache_print_object(), and sorcery_memory_cache_show().
unsigned int object_lifetime_stale |
The amount of time (in seconds) before an object is marked as stale, 0 if disabled.
Definition at line 137 of file res_sorcery_memory_cache.c.
Referenced by AST_TEST_DEFINE(), memory_cache_stale_check_object(), object_stale_callback(), sorcery_memory_cache_dump(), sorcery_memory_cache_open(), sorcery_memory_cache_print_object(), sorcery_memory_cache_show(), and sorcery_memory_cache_stale().
char* object_type |
The type of object we are caching.
Definition at line 151 of file res_sorcery_memory_cache.c.
Referenced by sorcery_memory_cache_ami_populate(), sorcery_memory_cache_destructor(), sorcery_memory_cache_load(), and sorcery_memory_cache_populate().
struct ao2_container* objects |
Objects in the cache.
Definition at line 131 of file res_sorcery_memory_cache.c.
Referenced by add_to_cache(), AST_TEST_DEFINE(), expire_objects_from_cache(), mark_all_as_stale_in_cache(), mark_object_as_stale_in_cache(), memory_cache_full_update(), memory_cache_populate(), memory_cache_stale_check(), memory_cache_stale_update_full(), remove_all_from_cache(), remove_from_cache(), remove_oldest_from_cache(), sorcery_memory_cache_ami_expire(), sorcery_memory_cache_ami_expire_object(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_ami_stale(), sorcery_memory_cache_ami_stale_object(), sorcery_memory_cache_close(), sorcery_memory_cache_complete_object_name(), sorcery_memory_cache_create(), sorcery_memory_cache_delete(), sorcery_memory_cache_destructor(), sorcery_memory_cache_dump(), sorcery_memory_cache_expire(), sorcery_memory_cache_open(), sorcery_memory_cache_populate(), sorcery_memory_cache_reload(), sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_id(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), sorcery_memory_cache_retrieve_regex(), sorcery_memory_cache_show(), sorcery_memory_cache_stale(), and stale_cache_update().
const struct ast_sorcery* sorcery |
An unreffed pointer to the sorcery instance, accessible only with lock held.
Definition at line 149 of file res_sorcery_memory_cache.c.
Referenced by alloc_and_initialize_sorcery(), AST_TEST_DEFINE(), sorcery_memory_cache_ami_populate(), sorcery_memory_cache_ami_stale_object(), sorcery_memory_cache_close(), sorcery_memory_cache_load(), sorcery_memory_cache_populate(), sorcery_memory_cache_retrieve_fields(), sorcery_memory_cache_retrieve_multiple(), sorcery_memory_cache_retrieve_prefix(), sorcery_memory_cache_retrieve_regex(), and sorcery_memory_cache_stale().
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().