From: Vsevolod Stakhov Date: Tue, 18 Feb 2020 13:17:00 +0000 (+0000) Subject: [Minor] Maps: Jitter HTTP maps load to get better chances of SSL caching X-Git-Tag: 2.4~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f76e655ca84d9f001434b8ee96b4951df2cd5156;p=thirdparty%2Frspamd.git [Minor] Maps: Jitter HTTP maps load to get better chances of SSL caching --- diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c index a837b11acd..a832adc4fa 100644 --- a/src/libserver/maps/map.c +++ b/src/libserver/maps/map.c @@ -1063,7 +1063,14 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, int how) timeout = map->poll_timeout; if (how & RSPAMD_MAP_SCHEDULE_INIT) { - timeout = 0.0; + if (map->active_http) { + /* Spill maps load to get better chances to hit ssl cache */ + timeout = rspamd_time_jitter (0.0, 2.0); + } + else { + timeout = 0.0; + } + reason = "init scheduled check"; } else {