## page was renamed from kresd/cache == kresd/cache == [[/kr_cache_peek]] [[/zonecut.c]] https://github.com/CZ-NIC/knot-resolver/issues/34 cache prefers parent-side TTL to authoritative #34 == 管理 == キャッシュは"kr_cache_*"インタフェースで管理される。  KR_CACHE_PKT, KR_CACHE_RR, KR_CACHE_SIGの三種類が存在している。(ほかにもある) $ grep KR_CACHE_ ../*.c {{{ ../cache.c: int ret = kr_cache_peek(txn, KR_CACHE_RR, rr->owner, rr->type, &entry, timestamp); ../cache.c: return kr_cache_insert(txn, KR_CACHE_RR, rr->owner, rr->type, &header, data); ../cache.c: int ret = kr_cache_peek(txn, KR_CACHE_SIG, rr->owner, rr->type, &entry, timestamp); ../cache.c: return kr_cache_insert(txn, KR_CACHE_SIG, rr->owner, covered, &header, data); ../resolve.c: int ret = kr_cache_peek(txn, KR_CACHE_PKT, target, KNOT_RRTYPE_NS, &entry, ×tamp); }}} $ grep KR_CACHE_ *.c {{{ pktcache.c: int ret = kr_cache_peek(txn, KR_CACHE_PKT, qname, rrtype, &entry, ×tamp); pktcache.c: if (flags & KR_CACHE_FLAG_WCARD_PROOF) { pktcache.c: .flags = KR_CACHE_FLAG_NONE, pktcache.c: header.flags |= KR_CACHE_FLAG_WCARD_PROOF; pktcache.c: int cached_rank = kr_cache_peek_rank(&txn, KR_CACHE_PKT, qname, qtype, header.timestamp); pktcache.c: int ret = kr_cache_insert(&txn, KR_CACHE_PKT, qname, qtype, &header, data); rrcache.c: if ((*flags) & KR_CACHE_FLAG_WCARD_PROOF) { rrcache.c: return commit_rrsig(baton, rank, KR_CACHE_FLAG_NONE, rr); rrcache.c: int cached_rank = kr_cache_peek_rank(baton->txn, KR_CACHE_RR, rr->owner, rr->type, baton->timestamp); rrcache.c: uint8_t flags = KR_CACHE_FLAG_NONE; rrcache.c: flags |= KR_CACHE_FLAG_WCARD_PROOF; }}} -- ToshinoriMaeno <>