Lines Matching refs:rrset
2 * services/cache/rrset.c - Resource record set cache.
39 * This file contains the rrset cache.
42 #include "services/cache/rrset.h"
101 * holding any other rrset lock.
124 /** see if rrset needs to be updated in the cache */
130 /* o store if rrset has been validated
141 /* if the cached rrset is bogus, and this one equal,
243 struct ub_packed_rrset_key* rrset, uint8_t* ce, size_t ce_len,
248 rrset = packed_rrset_copy_alloc(rrset, alloc, timenow);
249 if(!rrset) {
259 free(rrset->rk.dname);
260 rrset->rk.dname_len = ce_len + 2;
261 rrset->rk.dname = (uint8_t*)memdup(wc_dname, rrset->rk.dname_len);
262 if(!rrset->rk.dname) {
263 alloc_special_release(alloc, rrset);
268 rrset->entry.hash = rrset_key_hash(&rrset->rk);
269 ref.key = rrset;
270 ref.id = rrset->id;
345 log_warn("rrset LRU: memory allocation failed");
357 /* LRU touch, with no rrset locks held */
368 struct ub_packed_rrset_key* rrset, time_t now)
371 (struct packed_rrset_data*)rrset->entry.data;
376 rrset->entry.hash = rrset_key_hash(&rrset->rk);
378 e = slabhash_lookup(&r->table, rrset->entry.hash, rrset, 1);
384 return; /* rrset has changed in the meantime */
386 /* update the cached rrset */
393 if(ntohs(rrset->rk.type) != LDNS_RR_TYPE_NS ||
408 struct ub_packed_rrset_key* rrset, time_t now)
411 (struct packed_rrset_data*)rrset->entry.data;
416 rrset->entry.hash = rrset_key_hash(&rrset->rk);
418 e = slabhash_lookup(&r->table, rrset->entry.hash, rrset, 0);
424 return; /* expired, or rrset has changed in the meantime */