Optimize prefetch hitime

This commit is contained in:
Nick Peng
2019-08-12 23:08:39 +08:00
parent 4e11c13ec0
commit f801023569
3 changed files with 33 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ struct dns_cache {
unsigned int ttl;
int speed;
atomic_t hitnum;
int hitnum_update_add;
int del_pending;
time_t insert_time;
dns_type_t qtype;
@@ -46,6 +47,8 @@ void dns_cache_get(struct dns_cache *dns_cache);
void dns_cache_release(struct dns_cache *dns_cache);
int dns_cache_hitnum_dec_get(struct dns_cache *dns_cache);
void dns_cache_update(struct dns_cache *dns_cache);
typedef void dns_cache_preinvalid_callback(struct dns_cache *dns_cache);