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

The **`length`** method of the `CacheEntry` interface returns the size in bytes of the cached item, if known, otherwise returns `null` if the length is currently unknown.

The length of the cached item may be unknown if the item is currently being streamed into the cache without a fixed length.

## Syntax

```js
length()
```

### Parameters

None.

### Return value

A `number` or `null` which represents the current length of the cached item.

`null` is returned if the length is currently unknown.