FilePromptCache

class FilePromptCache(storage: Path, maxFiles: Int? = 3000) : PromptCache(source)

File-based implementation of PromptCache. This implementation stores cache entries in files on the file system.

Parameters

storage

The directory where cache files will be stored

maxFiles

The maximum number of files to store in the cache (default: 3000). When this limit is reached, the least recently accessed files will be removed.

Constructors

Link copied to clipboard
constructor(storage: Path, maxFiles: Int? = 3000)

Types

Link copied to clipboard

Factory implementation for creating FilePromptCache instances based on the provided configuration.

Functions

Link copied to clipboard
open suspend override fun get(prompt: Prompt, tools: List<ToolDescriptor>): List<Message.Response>?
Link copied to clipboard
open suspend override fun put(prompt: Prompt, tools: List<ToolDescriptor>, response: List<Message.Response>)