---
title: cachedTokenCount
framework: foundationmodels
role: symbol
role_heading: Instance Property
path: foundationmodels/languagemodelsession/usage-swift.struct/input-swift.struct/cachedtokencount
---

# cachedTokenCount

The number of input tokens that were served from a cache.

## Declaration

```swift
var cachedTokenCount: Int
```

## Discussion

Discussion This value will always be less than or equal to totalTokenCount.

## See Also

### Getting the token count

- [totalTokenCount](foundationmodels/languagemodelsession/usage-swift.struct/input-swift.struct/totaltokencount.md)
