Skip to content

Instantly share code, notes, and snippets.

@jenshalm
jenshalm / Cache.scala
Last active September 30, 2019 17:04
Example for caching with expiry in a referentially transparent way using cats-effect
/*
* Copyright 2019 - Jens Halm
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software