Skip to content

Commit

Permalink
Use in-memory http caching (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
asvoboda authored and bluekeyes committed Jun 10, 2019
1 parent 34647de commit 5bebbba
Show file tree
Hide file tree
Showing 6 changed files with 590 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
*.iml
*.ipr
*.iws
config/bulldozer.yml

build/
13 changes: 11 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package server
import (
"fmt"

"github.com/gregjones/httpcache"
"github.com/palantir/go-baseapp/baseapp"
"github.com/palantir/go-baseapp/baseapp/datadog"
"github.com/palantir/go-githubapp/githubapp"
Expand Down Expand Up @@ -53,6 +54,7 @@ func New(c *Config) (*Server, error) {
c.Github,
githubapp.WithClientUserAgent(userAgent),
githubapp.WithClientMiddleware(
githubapp.ClientCaching(func() httpcache.Cache { return httpcache.NewMemoryCache() }),
githubapp.ClientLogging(zerolog.DebugLevel),
githubapp.ClientMetrics(base.Registry()),
),
Expand Down
7 changes: 7 additions & 0 deletions vendor/github.com/gregjones/httpcache/LICENSE.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5bebbba

Please sign in to comment.