processRefreshResult applies the same cacheability gates as tryCacheSet (offset pagination, response size) and returns the cleaned payload.
()
| 1203 | // processRefreshResult applies the same cacheability gates as tryCacheSet |
| 1204 | // (offset pagination, response size) and returns the cleaned payload. |
| 1205 | func (s *gstate) processRefreshResult() ([]byte, []RowRef, error) { |
| 1206 | if len(s.data) == 0 || s.cs == nil || s.cs.st.qc == nil { |
| 1207 | return nil, nil, nil |
| 1208 | } |
| 1209 | qc := s.cs.st.qc |
| 1210 | if s.hasOffsetPagination(qc) { |
| 1211 | return nil, nil, nil |
| 1212 | } |
| 1213 | if len(s.data) > maxResponseSize { |
| 1214 | return nil, nil, nil |
| 1215 | } |
| 1216 | return NewResponseProcessor(qc).ProcessForCache(s.data) |
| 1217 | } |
| 1218 | |
| 1219 | // tryCacheSet stores the response in cache with row-level indices. |
| 1220 | func (s *gstate) tryCacheSet(c context.Context) { |
no test coverage detected