diff --git a/chdb/geoqueries.go b/chdb/geoqueries.go index d9dab76..9265e16 100644 --- a/chdb/geoqueries.go +++ b/chdb/geoqueries.go @@ -197,7 +197,7 @@ func (d *ClickHouse) DNSQueries(ctx context.Context) ([]DNSQueryCounts, error) { ctx, span := tracing.Tracer().Start(ctx, "DNSQueries") defer span.End() - startUnix := time.Now().Add(-90 * time.Minute).Unix() + startUnix := time.Now().Add(2 * time.Hour * -1).Unix() startUnix -= startUnix % (60 * 5) log.InfoContext(ctx, "start time", "start", startUnix) diff --git a/server/server.go b/server/server.go index 19d4797..d2aea45 100644 --- a/server/server.go +++ b/server/server.go @@ -288,6 +288,9 @@ func (srv *Server) dnsQueryCounts(c echo.Context) error { return c.String(http.StatusInternalServerError, err.Error()) } + hdr := c.Response().Header() + hdr.Set("Cache-Control", "s-maxage=30,max-age=60") + return c.JSON(http.StatusOK, data) }