Skip to content

Commit

Permalink
Merge branch 'feature/cache'
Browse files Browse the repository at this point in the history
  • Loading branch information
catatsuy committed Feb 28, 2016
2 parents cf2f83a + 35ce11e commit bf21192
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions benchmarker/checker/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ func (a *Action) PlayWithImage(s *Session) error {
req.Header.Add(key, val)
}

urlCache, found := cache.GetInstance().Get(a.Path)
if found {
urlCache, cacheFound := cache.GetInstance().Get(a.Path)
if cacheFound {
urlCache.Apply(req)
}

Expand All @@ -139,7 +139,8 @@ func (a *Action) PlayWithImage(s *Session) error {

success := false

if res.StatusCode == http.StatusNotModified {
// キャッシュが有効でかつStatusNotModifiedのときは成功
if cacheFound && res.StatusCode == http.StatusNotModified {
success = true
}

Expand Down

0 comments on commit bf21192

Please sign in to comment.