重置 app_st 的淘汰策略为 lru

This commit is contained in:
luwenpeng
2019-09-03 11:05:50 +08:00
parent 3e7d7ea7a3
commit 3f2c1cd969

View File

@@ -423,15 +423,16 @@ struct ssl_service_cache* ssl_service_cache_create(unsigned int slot_size, unsig
{
unsigned int app_expire_seconds = 2 * expire_seconds;
ret = MESA_htable_set_opt(htable, MHO_EXPIRE_TIME, &app_expire_seconds, sizeof(app_expire_seconds));
opt_val = HASH_ELIMINATE_ALGO_LRU;
ret = MESA_htable_set_opt(htable, MHO_ELIMIMINATE_TYPE, &opt_val, sizeof(int));
}
// for client table and server table
else
{
ret = MESA_htable_set_opt(htable, MHO_EXPIRE_TIME, &expire_seconds, sizeof(expire_seconds));
}
opt_val = HASH_ELIMINATE_ALGO_FIFO;
ret = MESA_htable_set_opt(htable, MHO_ELIMIMINATE_TYPE, &opt_val, sizeof(int));
}
ret = MESA_htable_set_opt(htable, MHO_CBFUN_DATA_FREE,
(void*)free_func[i], sizeof(free_func[i]));