Created
June 9, 2017 11:44
-
-
Save dnileshp/94b844f1ed026427d388dfe31e126d50 to your computer and use it in GitHub Desktop.
ScalaCache in scala
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
import scalacache.memcached.MemcachedCache | |
/** | |
* Created by dnilesh on 9/6/17. | |
* | |
*/ | |
class ScalaCache { | |
import scalacache._ | |
import memoization._ | |
implicit val scalaCache = ScalaCache(MemcachedCache("127.0.0.1:11211")) | |
import scala.concurrent.duration._ | |
def GetWipUsersByRole(request: RequestDTO) : ResponseDTO = memoizeSync(7.days) { | |
// method specific implementation. | |
ResponseDTO | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment