MINOR: cache: Larger HTTP objects caching.
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 22 Oct 2018 16:01:48 +0000 (18:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Oct 2018 02:37:12 +0000 (04:37 +0200)
commit8df65ae5e26531d4794e9bf9887b83f1428fc6d0
treed60573b7d792f88973eb4624cfda13ca95da63e2
parent0bec807e087cb65b77865607e0c64cd0d44556bc
MINOR: cache: Larger HTTP objects caching.

This patch makes the capable of storing HTTP objects larger than a buffer.
It makes usage of the "block by block shared object allocation" new shctx API.

A new pointer to struct shared_block has been added to the cache applet
context to memorize the next block to be used by the HTTP cache I/O handler
http_cache_io_handler() to emit the data. Another member, named "sent" memorize
the number of bytes already sent by this handler. So, to send an object from cache,
http_cache_io_handler() must be called until "sent" counter reaches the size
of this object.
include/types/applet.h
src/cache.c