---
title: CacheEntry
summary: CacheEntry contains the contents and TTL (time-to-live) for an item to be added to the cache via GetOrSet or GetOrSetContents.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/cache/simple/struct.CacheEntry/
---

**Kind:** Struct  
**Module:** [simple](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/cache/simple/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/cache/simple/simple.go#L39

```go
type CacheEntry struct {
	Body io.Reader

	TTL time.Duration
}
```

CacheEntry contains the contents and TTL (time-to-live) for an item
to be added to the cache via [GetOrSet](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/cache/simple/fn.GetOrSet/) or [GetOrSetContents].

## Fields

### Body

**Type:** `io.Reader`

The contents of the cached object.

### TTL

**Type:** `time.Duration`

The time-to-live for the cached object.
