# maxAgeFromCacheControl

Reads the `max-age` of a `Cache-Control` header in seconds. `no-store`,
`no-cache`, a missing header and anything unreadable give 0.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { maxAgeFromCacheControl } from "@mapcairn/core";
 
function maxAgeFromCacheControl(header: string | null): number;
```

## Parameters

- `header` (`string | null`)

## Returns

`number`

Source: [packages/core/src/layers/responseCache.ts:36](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/responseCache.ts#L36)
