# Cache Eviction support

> Orbital's caching layer now supports HTTP Cache headers

Source: https://orbitalhq.com/changelog/2024-01-26-cache-eviction
Date: 2024-01-26
Version: 0.27.0

## Expiry for Cached Queries

Orbital now honours HTTP cache headers on HTTP responses, when a cache is enabled for a query.

As described in [Caching](/docs/querying/caching) Orbital provides ability to cache query results with `@Cache` annotation:

```taxi
> @Cache(connection = "mycache")
  find { Film[] }
```

Let assume that you have a rest end point returning list of films:

```taxi
service FilmServices {
  @HttpOperation(method = "GET", url = "...")
  operation listFilms():Film[]
}
```

If your Rest operation returns [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) header in its response,
Orbital will take the `max-age` directive into account and expire the cached query result accordingly.

Here as an example response with Cache-Control header:

`max-age=144004` will get Orbital to cache the Film list for 4 hours. After 4 hours, the items in the query cache will expire automatically.

## Grab the docs
Read more about caching in our [docs](/docs/querying/caching)
