mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 00:17:11 +00:00
5a424219d2
* perf(signer): cache signing key to avoid redundant HMAC-SHA256 Cache the AWS4 signing key per (secret, region, date, service_type) tuple. The signing key is derived from 4 HMAC-SHA256 calls and is constant for a given user within the same UTC day, so caching it eliminates ~0.5-1ms of redundant crypto per request. The cache uses a LazyLock<Mutex<HashMap>> with automatic daily rotation (cache entries naturally expire when the date component of the key changes). Refs: https://github.com/rustfs/backlog/issues/2005 Co-Authored-By: heihutu <heihutu@gmail.com> * fix(signer): bound signing key cache * fix(signer): satisfy cache lint --------- Co-authored-by: heihutu <heihutu@gmail.com> Co-authored-by: overtrue <anzhengchao@gmail.com>