Include cache hit/miss info in return type

This can be useful downstream for diagnostics.
This commit is contained in:
William Carroll 2020-12-12 02:41:42 +00:00
parent 1a404a58de
commit 45877a8b9c
2 changed files with 4 additions and 3 deletions

View file

@ -16,11 +16,11 @@ defmodule Server do
res ->
Cache.put(n, res)
res
{:miss, res}
end
hit ->
hit
{:hit, hit}
end
end