Created
October 31, 2011 05:05
-
-
Save jestan/1326942 to your computer and use it in GitHub Desktop.
Dispatch Http Caching
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
#Http Caching | |
trait HttpCache extends Http { | |
override def make_client: org.apache.http.client.HttpClient = { | |
val config = new CacheConfig | |
config.setMaxCacheEntries(500) | |
config.setMaxObjectSizeBytes(50000) | |
new CachingHttpClient(super.make_client, config) | |
} | |
} | |
val http = new Http with with HttpCache with thread.Safety with NoLogging |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment