ブックマーク / djherbis.com (1)

  • #golang stream caching - djherbis

    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 wr

    tmatsuu
    tmatsuu 2016/07/24
    Write中も複数がReadを始められるgo言語用のstream cache実装。うおーこれアツくないか。他言語でも欲しい。
  • 1