-
-
Save daneko/2707601 to your computer and use it in GitHub Desktop.
This file contains 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
def index(id:String) = Action { | |
getFirstData(id) | |
} | |
private def getFirstData(id:String) = { | |
Cache.get(id) match { | |
case Some(id2) => getSecondData(id2) | |
case None => NotFound | |
} | |
} | |
private def getSecondData(id2:String) = { | |
Cache.get(id2) match { | |
case Some(result) => Ok(result) | |
case None => NotFound | |
} | |
} |
This file contains 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
def index(id:String) = Action { | |
Cache.get(id) match { | |
case Some(id2) => { | |
Cache.get(id2) match { | |
case Some(result) => Ok(result) | |
case None => NotFound | |
} | |
} | |
case None => NotFound | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment