---
title: "KVSpecOptions"
sidebar_label: "KVSpecOptions"
description: "Kotlin binding reference: KVSpecOptions."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[KVSpecOptions](index.md)

# KVSpecOptions

[common]\
data class [KVSpecOptions](index.md)(val batch: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 1, val pastLenMin: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, val pastLenOpt: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, val pastLenMax: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0)

The session cache sizing of a model served from a graph with a KV cache: the batch every cache input is specced at and the past length as a min / opt / max range (the one-value form fixes it). A graph without a KV cache ignores it.

## Constructors

| | |
|---|---|
| [KVSpecOptions](KVSpecOptions.md) | [common]<br>constructor(batch: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html), pastLen: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html))<br>Every cache input at batch with a fixed pastLen.<br>constructor(batch: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 1, pastLenMin: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, pastLenOpt: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0, pastLenMax: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0) |

## Properties

| Name | Summary |
|---|---|
| [batch](batch.md) | [common]<br>val [batch](batch.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 1 |
| [pastLenMax](pastLenMax.md) | [common]<br>val [pastLenMax](pastLenMax.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0 |
| [pastLenMin](pastLenMin.md) | [common]<br>val [pastLenMin](pastLenMin.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0 |
| [pastLenOpt](pastLenOpt.md) | [common]<br>val [pastLenOpt](pastLenOpt.md): [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html) = 0 |