commit | f528fff46bc00426f0329b46cbf77a88c92d3f8d | [log] [tgz] |
---|---|---|
author | William Lallemand <wlallemand@haproxy.com> | Thu Nov 23 19:43:17 2017 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Thu Nov 23 20:20:04 2017 +0100 |
tree | 6eae2c0b52703d0b66c288678d67e8dfe2ed6bb3 | |
parent | 7fc96d5a01b85cd324faa57da7bfedbe52f96dfe [diff] |
MEDIUM: cache: store sha1 for hashing the cache key The cache was relying on the txn->uri for creating its key, which was a big problem when there was no log activated. This patch does a sha1 of the host + uri, and stores it in the txn. When a object is stored, the eb32node uses the first 32 bits of the hash as a key, and the whole hash is stored in the cache entry. During a lookup, the truncated hash is used, and when it matches an entry we check the real sha1.