10. Cache
- HAProxy provides a cache, which was designed to perform cache on small objects
- (favicon, css...). This is a minimalist low-maintenance cache which runs in
- RAM.
-
- The cache is based on a memory which is shared between processes and threads,
- this memory is split in blocks of 1k.
-
- If an object is not used anymore, it can be deleted to store a new object
- independently of its expiration date. The oldest objects are deleted first
- when we try to allocate a new one.
-
- The cache uses a hash of the host header and the URI as the key.
-
- It's possible to view the status of a cache using the Unix socket command
- "show cache" consult section 9.3 "Unix Socket commands" of Management Guide
- for more details.
-
- When an object is delivered from the cache, the server name in the log is
- replaced by "<CACHE>".