Toggle Gravatar support at the system settings.

This commit is contained in:
takezoe
2013-07-25 03:00:46 +09:00
parent 34e2663492
commit b61836adf7
5 changed files with 84 additions and 50 deletions

View File

@@ -1,6 +1,7 @@
package service
import model._
import service.SystemSettingsService.SystemSettings
/**
* This service is used for a view helper mainly.
@@ -10,6 +11,11 @@ import model._
*/
trait RequestCache {
def getSystemSettings()(implicit context: app.Context): SystemSettings =
context.cache("system_settings"){
new SystemSettingsService {}.loadSystemSettings()
}
def getIssue(userName: String, repositoryName: String, issueId: String)(implicit context: app.Context): Option[Issue] = {
context.cache(s"issue.${userName}/${repositoryName}#${issueId}"){
new IssuesService {}.getIssue(userName, repositoryName, issueId)