---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# CacheEntry.hits

The **`hits`** method of the `CacheEntry` interface returns the amount of cache hits for the cached item.

Note: this hit count only reflects the view of the server that supplied the cached item. Due to clustering, this count may vary between potentially many servers within the data center where the item is cached. See the [clustering documentation](https://developer.fastly.com/learning/vcl/clustering/) for details, though note that the exact caching architecture of Compute is different from VCL services.

## Syntax

```js
hits()
```

### Parameters

None.

### Return value

A `number` which represents the number of cache hits to this cached item.
