Latitude implements a caching system for prompt responses to optimize performance and reduce costs. This guide explains how caching works and when it’s applied.Documentation Index
Fetch the complete documentation index at: https://docs-v1.latitude.so/llms.txt
Use this file to discover all available pages before exploring further.
How Caching Works
When you execute a prompt, Latitude automatically caches the response if certain conditions are met. The cache key is generated based on:- The workspace ID
- The prompt configuration
- The conversation context
Cache Conditions
Caching is only applied when:- The temperature is set to 0 or not specified
- The prompt execution is successful
Benefits
Caching provides several advantages:- Reduced Costs: Cached responses don’t consume additional API tokens
- Faster Response Times: Cached results are returned immediately
- Consistency: Identical prompts always return the same response
Cache Duration
Currently, cached responses are stored indefinitely. However, you can force a fresh execution by:- Modifying any part of the prompt configuration
- Changing the conversation context
- Using a non-zero temperature