(s *scope, origParams url.Values, req *http.Request)
| 174 | } |
| 175 | |
| 176 | func shouldRespondFromCache(s *scope, origParams url.Values, req *http.Request) ([]byte, bool, error) { |
| 177 | if s.user.cache == nil || s.user.cache.Cache == nil { |
| 178 | return nil, false, nil |
| 179 | } |
| 180 | |
| 181 | noCache := origParams.Get("no_cache") |
| 182 | if noCache == "1" || noCache == "true" { |
| 183 | return nil, false, nil |
| 184 | } |
| 185 | |
| 186 | q, err := getFullQuery(req) |
| 187 | if err != nil { |
| 188 | return nil, false, fmt.Errorf("%s: cannot read query: %w", s, err) |
| 189 | } |
| 190 | |
| 191 | return q, canCacheQuery(q), nil |
| 192 | } |
| 193 | |
| 194 | func executeWithRetry( |
| 195 | ctx context.Context, |
no test coverage detected