#golang stream caching
djherbis/fscache Objective Our Web server needs to perform an “expensive” process to create downloads. We want to cache these files so they don’t have to be generated on every request. If two or more concurrent clients ask for the same file, don’t generate it twice. A naive cache design might look like this: Well the above code is pretty bad. We’re blocking all requests while the cache is being written to.