MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / cache_init_load

Function cache_init_load

modules/sql_cacher/sql_cacher.c:1346–1368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344}
1345
1346static void cache_init_load(int sender, void *param)
1347{
1348 db_handlers_t *db_hdls;
1349
1350 for (db_hdls = db_hdls_list; db_hdls; db_hdls = db_hdls->next) {
1351
1352 if (init_rld_vers_key(db_hdls->c_entry, db_hdls) < 0) {
1353 LM_ERR("Failed to set up reload version counter in cahchedb for "
1354 "entry: %.*s\n", db_hdls->c_entry->id.len, db_hdls->c_entry->id.s);
1355 return;
1356 }
1357
1358 /* cache the entire table in full caching mode */
1359 if (!db_hdls->c_entry->on_demand &&
1360 load_entire_table(db_hdls->c_entry, db_hdls, 0) < 0) {
1361 LM_ERR("Failed to cache the entire table: %s\n", db_hdls->c_entry->table.s);
1362 continue;
1363 } else
1364 LM_DBG("Cached table: %.*s\n", db_hdls->c_entry->table.len,
1365 db_hdls->c_entry->table.s);
1366
1367 }
1368}
1369
1370static int mod_init(void)
1371{

Callers

nothing calls this directly

Calls 2

init_rld_vers_keyFunction · 0.85
load_entire_tableFunction · 0.85

Tested by

no test coverage detected