There is this example of caching at the end of readme:
def fetchTwice[F[_] : Concurrent]: Fetch[F, (String, String)] = for {
one <- fetchString(1)
two <- fetchString(1)
} yield (one, two)
Isn't this just a deduplication? I mean, results are not saved to the next call:
val l: Fetch[IO, (Option[String], Option[String])] = for {
d1 <- data.fetchElem(0)
d2 <- data.fetchElem(0)
} yield (d1, d2)
Fetch.run(l).unsafeRunSync() // asks for elem 0 once
Fetch.run(data.fetchElem(0)).unsafeRunSync() // asks for elem 0 too, not cached?
There is this example of caching at the end of readme:
Isn't this just a deduplication? I mean, results are not saved to the next call: