feat: caching headers

This commit is contained in:
2026-03-02 22:37:48 +01:00
parent 19fb5b9292
commit e689ab08c9
19 changed files with 292 additions and 55 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
func (h *Handler) home(w http.ResponseWriter, r *http.Request) {
pageHeaders, err := h.src.GetPages()
pageHeaders, err := h.src.GetPages(r.Context())
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
return
+1 -1
View File
@@ -22,6 +22,6 @@ func New(mux *http.ServeMux, srv pageService) *Handler {
}
type pageService interface {
GetPages() ([]page.PageHeader, error)
GetPages(ctx context.Context) ([]page.PageHeader, error)
GetPage(ctx context.Context, uid string) (page.Page, error)
}