ladybird/Libraries/LibHTTP
Timothy Flynn d773ba25cf LibHTTP: Impose a limit on the total disk cache size
Rather than letting our disk cache grow unbounded, let's impose a limit
on the estimated total disk cache size. The limits chosen are vaguely
inspired by Chromium.

We impose a total disk cache limit of 5 GiB. Chromium imposes an overall
limit of 1.25 GiB; I've chosen more here because we currently cache
uncompressed data from cURL.

The limit is further restricted by the amount of available disk space,
which we just check once at startup (as does Chromium). We will choose a
percentage of the free space available on systems with limited space.

Our eviction errs on the side of simplicity. We will remove the least
recently accessed entries until the total estimated cache size does not
exceed our limit. This could potentially be improved in the future. For
example, if the next entry to consider is 40 MiB, and we only need to
free 1 MiB of space, we could try evicting slightly more recently used
entries. This would prevent evicting more than we need to.
2026-02-13 10:20:52 -05:00
..
Cache LibHTTP: Impose a limit on the total disk cache size 2026-02-13 10:20:52 -05:00
Cookie LibHTTP+LibWeb: Move the IncludeCredentials enum to LibHTTP 2026-02-10 12:21:20 +01:00
CMakeLists.txt LibHTTP+Everywhere: Move the cookie implementation to LibHTTP 2026-02-10 12:21:20 +01:00
Forward.h LibHTTP+LibWeb: Move the IncludeCredentials enum to LibHTTP 2026-02-10 12:21:20 +01:00
Header.cpp LibWeb: Skip range requests for media if the server won't accept them 2026-01-29 05:22:27 -06:00
Header.h LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
HeaderList.cpp LibHTTP: Fix inverted Content-Range complete-length parsing 2026-02-13 09:39:49 +01:00
HeaderList.h LibHTTP: Implement extraction of the Content-Range values in HeaderList 2026-01-29 05:22:27 -06:00
HTTP.cpp LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
HTTP.h LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
HttpRequest.cpp LibHTTP: Remove unused HttpRequest functions re: basic auth 2025-11-28 08:48:33 -05:00
HttpRequest.h LibHTTP: Remove unused HttpRequest functions re: basic auth 2025-11-28 08:48:33 -05:00
Method.cpp LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
Method.h LibHTTP+LibWeb+RequestServer: Move Fetch's HTTP header infra to LibHTTP 2025-11-27 14:57:29 +01:00
Status.h LibHTTP+LibWeb: Remove unused HTTP::HTTPResponse 2025-11-27 14:57:29 +01:00