()
| 163 | } |
| 164 | |
| 165 | func (h *Handler) openDB() (*bolthold.Store, error) { |
| 166 | return bolthold.Open(filepath.Join(h.dir, "bolt.db"), 0o644, &bolthold.Options{ |
| 167 | Encoder: json.Marshal, |
| 168 | Decoder: json.Unmarshal, |
| 169 | Options: &bbolt.Options{ |
| 170 | Timeout: 5 * time.Second, |
| 171 | NoGrowSync: bbolt.DefaultOptions.NoGrowSync, |
| 172 | FreelistType: bbolt.DefaultOptions.FreelistType, |
| 173 | }, |
| 174 | }) |
| 175 | } |
| 176 | |
| 177 | // GET /_apis/artifactcache/cache |
| 178 | func (h *Handler) find(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { |