重置 app_st 的淘汰策略为 lru
This commit is contained in:
@@ -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;
|
unsigned int app_expire_seconds = 2 * expire_seconds;
|
||||||
ret = MESA_htable_set_opt(htable, MHO_EXPIRE_TIME, &app_expire_seconds, sizeof(app_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
|
// for client table and server table
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ret = MESA_htable_set_opt(htable, MHO_EXPIRE_TIME, &expire_seconds, sizeof(expire_seconds));
|
ret = MESA_htable_set_opt(htable, MHO_EXPIRE_TIME, &expire_seconds, sizeof(expire_seconds));
|
||||||
}
|
|
||||||
|
|
||||||
opt_val = HASH_ELIMINATE_ALGO_FIFO;
|
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_ELIMIMINATE_TYPE, &opt_val, sizeof(int));
|
||||||
|
}
|
||||||
|
|
||||||
ret = MESA_htable_set_opt(htable, MHO_CBFUN_DATA_FREE,
|
ret = MESA_htable_set_opt(htable, MHO_CBFUN_DATA_FREE,
|
||||||
(void*)free_func[i], sizeof(free_func[i]));
|
(void*)free_func[i], sizeof(free_func[i]));
|
||||||
|
|||||||
Reference in New Issue
Block a user