Files
kumomta/docs
Wez Furlong 3ad5856021 memoize: add thundering herd protection
If many calls are made to the memoized function with the same parameters
at the time that the cache is empty/expired, then each of those
concurrent calls will proceed to compute and populate the cache.  This
is known as a thundering herd, and can be painful if the amount of work
performed by the cache population function is high, or alternatively, if
the level of concurrency is high and some system resource is required to
satisfy the call, this can put the system under higher pressure.

This commit adds a simple mechanism to mitigate this: each combination
of cache and cache parameters is paired with an optional semaphore that
is used to constrain concurrency to a single call. This could be a
mutex, but using a semaphore allows future explicit control over the
concurrency level.
2024-04-19 09:11:51 -07:00
..
2023-10-18 16:18:56 -06:00
2024-02-08 08:12:29 -07:00
2023-03-13 12:01:07 -07:00
2024-03-31 06:49:14 -07:00
2024-03-29 09:06:54 -07:00
2024-01-24 15:40:19 -05:00