Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Query with cache
...
def groupJobLevel(): List[GroupJobLevel] = {
val cache = Cache.get("GROUPJOBLEVEL")
if (cache.isDefined) {
return cache.get.asInstanceOf[List[GroupJobLevel]]
}
val result = queryGroupJobLevel()
if (result != null) {
Cache.set("GROUPJOBLEVEL", result)
}
return result
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.