Commit graph

10 commits

Author SHA1 Message Date
modal-d17
af445a357d Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.

Added a Measurable struct that acts as a container for fields size_of() can be called for.

Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.

Updated test file.
2018-04-01 13:30:57 -04:00
CYBAI
0dda473146 Use specific assertion for net http_cache 2018-01-26 01:01:02 +08:00
Gregory Terzian
993e2f55ed handle caching of response with a body of ResponseBody::Receiving 2018-01-13 10:48:36 +08:00
Gregory Terzian
609e975c50 ignore aborted response in http caching 2018-01-13 10:48:35 +08:00
Emilio Cobos Álvarez
820c9a1828
net: Use ? on Option more often. 2017-12-09 20:46:20 +01:00
Hugh Gallagher
1b4b1c2bb2 Removed unused import in net/http_cache.rs 2017-11-21 14:09:25 +00:00
Gregory Terzian
6196a6e65d add pref to disable http cache, mozilla tests 2017-11-19 13:52:13 +08:00
Gregory Terzian
5f8a310bd1 also cache redirects 2017-11-17 21:36:30 +08:00
Gregory Terzian
2799b4eac9 more http cache work 2017-11-16 13:36:12 +08:00
Josh Matthews
f674cba612 Beginnings of a http cache
Doom cache entries based on the initial response, and prevent matching against doomed cache enties.

Evict cache entries that have passed their expiry date instead of matching them.

Document the cache. Refactor incomplete entries to lessen Option-itis.

Revalidate expired cache entries instead of unconditionally evicting them.

Forbid missing docs in cache code.

Revalidate must-revalidate entries.

Fetch content tests from a local HTTP server.

Track requests made to the test HTTP server.

Add a simple test that a cached resource with no expiry is not revalidated. Correct inverted expiry check in revalidation code.

Fix incorrect revalidation logic that dropped the consumer channels on the floor.

Ensure that requests are cached based on their request headers.

Run a separate http server instance for each test to avoid intermittent failures due to concurrent cache tests.

Add a test for uncacheable responses.

Address review comments.
2017-11-14 17:20:39 +08:00