go-interview-problems/04-non-blocking-cache
2025-04-04 04:30:11 +02:00
..
2025-04-04 04:30:11 +02:00
2025-04-04 04:30:11 +02:00
2025-04-04 04:30:11 +02:00

Non-Blocking Cache

Implement a non-blocking cache that stores previously fetched responses from URLs. The cache should:

  • Return cached data if the requested URL has been fetched before.
  • Fetch and store new data asynchronously if the URL is not in the cache.
  • Ensure multiple concurrent requests for the same URL do not trigger multiple fetches.

Tags

Concurrency

Source