We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf2f83a + 35ce11e commit bf21192Copy full SHA for bf21192
benchmarker/checker/action.go
@@ -120,8 +120,8 @@ func (a *Action) PlayWithImage(s *Session) error {
120
req.Header.Add(key, val)
121
}
122
123
- urlCache, found := cache.GetInstance().Get(a.Path)
124
- if found {
+ urlCache, cacheFound := cache.GetInstance().Get(a.Path)
+ if cacheFound {
125
urlCache.Apply(req)
126
127
@@ -139,7 +139,8 @@ func (a *Action) PlayWithImage(s *Session) error {
139
140
success := false
141
142
- if res.StatusCode == http.StatusNotModified {
+ // キャッシュが有効でかつStatusNotModifiedのときは成功
143
+ if cacheFound && res.StatusCode == http.StatusNotModified {
144
success = true
145
146
0 commit comments