Last active
December 15, 2020 11:41
-
-
Save k1dbl4ck/4c51ac6dffe6ed19ffaaef923a41646d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class CachePolicy( | |
val type: Type? = Type.ALWAYS, | |
val expires: Long = 0 | |
) { | |
enum class Type { | |
NEVER, // never create a cache line for the key | |
ALWAYS, // always create a cache line for the key | |
REFRESH, // re-fetch (refresh) the cache line for the key | |
CLEAR, // clear the cache line for the key | |
EXPIRES // expire this cache line and refresh if older than expires | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment