---
title: Override TTLs for path prefixes
summary: Set TTLs at the edge based on looking up a path prefix in a dictionary.
url: https://www.fastly.com/documentation/solutions/examples/overriding-ttls-path-prefix
---

Set TTLs at the edge based on looking up a path prefix in a dictionary.

## VCL

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/2cae85a6)

## Compute

### Rust

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/8543d8e4)

### Javascript

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/f1a0989e)

### Go

[Try it in Fastly Fiddle](https://fiddle.fastly.dev/8d8c380e)

