conf: support disable expired cache on specific domain.

This commit is contained in:
Nick Peng
2022-12-18 22:33:01 +08:00
committed by Nick Peng
parent 4b42e1ef85
commit 70df7938f3
13 changed files with 87 additions and 21 deletions

View File

@@ -87,6 +87,7 @@ struct dns_cache_info {
int ttl;
int hitnum;
int speed;
int no_inactive;
int hitnum_update_add;
time_t insert_time;
time_t replace_time;
@@ -135,11 +136,11 @@ struct dns_cache_data *dns_cache_new_data_packet(void *packet, size_t packet_len
int dns_cache_init(int size, int enable_inactive, int inactive_list_expired);
int dns_cache_replace(struct dns_cache_key *key, int ttl, int speed, struct dns_cache_data *cache_data);
int dns_cache_replace(struct dns_cache_key *key, int ttl, int speed, int no_inactive, struct dns_cache_data *cache_data);
int dns_cache_replace_inactive(struct dns_cache_key *key, int ttl, int speed, struct dns_cache_data *cache_data);
int dns_cache_replace_inactive(struct dns_cache_key *key, int ttl, int speed, int no_inactive, struct dns_cache_data *cache_data);
int dns_cache_insert(struct dns_cache_key *key, int ttl, int speed, struct dns_cache_data *cache_data);
int dns_cache_insert(struct dns_cache_key *key, int ttl, int speed, int no_inactive, struct dns_cache_data *cache_data);
struct dns_cache *dns_cache_lookup(struct dns_cache_key *key);