# Class ReputationCache

In-memory reputation cache with TTL and max size. Reduces redundant assessments for the same user within a short window. Evicts oldest entries when max size is exceeded.

- Defined in packages/nexus-agents/src/security/reputation-model.ts:100

##### Index

### Constructors

constructor

### Accessors

size

### Methods

get
set
clear

## Constructors

### constructor

- new ReputationCache(ttlMs?: number, maxSize?: number): ReputationCache

  #### Parameters

  - ttlMs: number = DEFAULT_TTL_MS
  - maxSize: number = DEFAULT_MAX_SIZE

  #### Returns ReputationCache

  - Defined in packages/nexus-agents/src/security/reputation-model.ts:105

## Accessors

### size

- get size(): number

  #### Returns number

  - Defined in packages/nexus-agents/src/security/reputation-model.ts:145

## Methods

### get

- get(username: string): ReputationAssessment | undefined

  #### Parameters

  - username: string

  #### Returns ReputationAssessment | undefined

  - Defined in packages/nexus-agents/src/security/reputation-model.ts:110

### set

- set(username: string, assessment: ReputationAssessment): void

  #### Parameters

  - username: string
  - assessment: ReputationAssessment

  #### Returns void

  - Defined in packages/nexus-agents/src/security/reputation-model.ts:120

### clear

- clear(): void

  #### Returns void

  - Defined in packages/nexus-agents/src/security/reputation-model.ts:141