Ugh, I hate markdown. Here's the pseudocode I was trying to give:
``` bool get_cache_entry(...) { for (each entry in cache) { if (entry matches) return cache entry (or fill and return true) }
return false; }
read_cached_chunk(...) { if (get_cache_entry(...)) return (or fill and return)
issue_read_request(...)
insert new cache entry }
read_input_cache(...) { for (each aligned chunk) read_cached_chunk(...) } ```