# CacheInvalidInputError

Defined in: [packages/cache/src/errors.ts:31](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cache/src/errors.ts#L31)

Thrown when a cache is constructed with options that cannot bound it, when a write or clock reading violates the cache’s contract, or when a custom eviction policy names a victim the cache cannot evict or calls back into its own cache.

## Extends

* [`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/)<[`CacheInvalidInputErrorCode`](/reference/knotkit/cache/type-aliases/cacheinvalidinputerrorcode/)>

## Constructors

### Constructor

> **new CacheInvalidInputError**(`code`, `message`): `CacheInvalidInputError`

Defined in: [packages/errors/src/index.ts:40](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L40)

#### Parameters

##### code

`"INVALID_CAPACITY"` | `"INVALID_WEIGHT"` | `"ENTRY_TOO_HEAVY"` | `"INVALID_VALUE"` | `"INVALID_TIME_TO_LIVE"` | `"MISSING_CLOCK"` | `"INVALID_CLOCK_READING"` | `"INVALID_VICTIM"` | `"REENTRANT_POLICY"`

##### message

`string`

#### Returns

`CacheInvalidInputError`

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`constructor`](/reference/knotkit/errors/classes/invalidinputerror/#constructor)

## Properties

### moduleName

> `readonly` **moduleName**: `"knotkit/cache"`

Defined in: [packages/cache/src/errors.ts:32](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cache/src/errors.ts#L32)

#### Overrides

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`moduleName`](/reference/knotkit/errors/classes/invalidinputerror/#modulename)

***

### \_tag

> `readonly` **\_tag**: `"InvalidInputError"`

Defined in: [packages/errors/src/index.ts:38](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L38)

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`_tag`](/reference/knotkit/errors/classes/invalidinputerror/#_tag)

***

### code

> `readonly` **code**: `"INVALID_CAPACITY"` | `"INVALID_WEIGHT"` | `"ENTRY_TOO_HEAVY"` | `"INVALID_VALUE"` | `"INVALID_TIME_TO_LIVE"` | `"MISSING_CLOCK"` | `"INVALID_CLOCK_READING"` | `"INVALID_VICTIM"` | `"REENTRANT_POLICY"`

Defined in: [packages/errors/src/index.ts:41](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/errors/src/index.ts#L41)

#### Inherited from

[`InvalidInputError`](/reference/knotkit/errors/classes/invalidinputerror/).[`code`](/reference/knotkit/errors/classes/invalidinputerror/#code-1)
