Skip to content

Instantly share code, notes, and snippets.

View marcodippy's full-sized avatar

Marco Di Paola marcodippy

  • Facebook
  • London
View GitHub Profile
@marcodippy
marcodippy / cacheWithRefresh.scala
Created May 24, 2019 13:20
Interface for a cached value updated in background every N seconds
package com.ovoenergy.rac.service
import cats.effect._
import cats.effect.concurrent.Ref
import cats.effect.implicits._
import cats.implicits._
import fs2.Stream
import scala.concurrent.duration._