Concurrent caching client for byte-range file reads
Design a client that reads byte ranges of remote files and caches what it has fetched, so a later read of a range it already holds is served locally. Many threads use one client at once. Explain how you store and look up cached ranges, how overlapping requests for the same range avoid fetching it twice, and how you keep the cache within its memory budget.
No answer yet. Write the first one; the best answer gets endorsed.
