Closed
Description
Describe the bug
We enabled negative offset feature by default in Cortex. However, negative offset might query data in the future timestamp and those latest data response shouldn't be cached. We missed such check in Query Frontend similar to what we have for @ modifier https://github.com/cortexproject/cortex/blob/master/pkg/querier/tripperware/queryrange/results_cache.go#L313.
Expected behavior
If a query has negative offset, I expect we won't cache its results if the promql query time range after applying negative offset is later than max cache freshness time.
We can also start simple by not caching queries with negative offset.