mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
Adjust the documentation. Rename endpoint to recalculate-caches
This commit is contained in:
parent
5418dc152e
commit
a7ec49c6ad
3 changed files with 7 additions and 5 deletions
|
|
@ -414,12 +414,14 @@ Response:
|
|||
|
||||
### Recalculate Caches
|
||||
|
||||
`POST /recalculatecaches`
|
||||
`POST /recalculate-caches`
|
||||
|
||||
Recalculates the caches on demand. The cache is recalculated every 10
|
||||
secondes by default. This endpoint can be used to recalculate the cache
|
||||
seconds by default. This endpoint can be used to recalculate the cache
|
||||
before the 10 second interval. This should probably only be used in
|
||||
integration tests and not in a typical production workflow.
|
||||
integration tests and not in a typical production workflow. Note that
|
||||
in a multi-node cluster, the cache is only recalculated on the node
|
||||
that receives the request.
|
||||
|
||||
Response: `204 No Content`
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ func NewRouter(handler *Handler) *mux.Router {
|
|||
router.HandleFunc("/slices/max", handler.handleGetSliceMax).Methods("GET")
|
||||
router.HandleFunc("/status", handler.handleGetStatus).Methods("GET")
|
||||
router.HandleFunc("/version", handler.handleGetVersion).Methods("GET")
|
||||
router.HandleFunc("/recalculatecaches", handler.handleRecalculateCaches).Methods("POST")
|
||||
router.HandleFunc("/recalculate-caches", handler.handleRecalculateCaches).Methods("POST")
|
||||
|
||||
// TODO: Apply MethodNotAllowed statuses to all endpoints.
|
||||
// Ideally this would be automatic, as described in this (wontfix) ticket:
|
||||
|
|
|
|||
|
|
@ -1792,7 +1792,7 @@ func TestHandler_RecalculateCaches(t *testing.T) {
|
|||
h.Cluster = test.NewCluster(1)
|
||||
|
||||
w := httptest.NewRecorder()
|
||||
h.ServeHTTP(w, test.MustNewHTTPRequest("POST", "/recalculatecaches", nil))
|
||||
h.ServeHTTP(w, test.MustNewHTTPRequest("POST", "/recalculate-caches", nil))
|
||||
if w.Code != http.StatusNoContent {
|
||||
t.Fatalf("unexpected status code: %d", w.Code)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue