Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lemondata.cc/llms.txt

Use this file to discover all available pages before exploring further.

Overview

LemonData automatically manages caching to optimize performance and reduce costs. While there is no public endpoint to clear cache entries, you have full control over caching behavior through request-level controls. This page is a usage guide for request-side cache controls. For strict API reference pages, see:

Bypassing Cache

To get fresh responses without using cache, use the cache_control parameter in your request:
curl -X POST "https://api.lemondata.cc/v1/chat/completions" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}],
    "cache_control": {"type": "no_cache"}
  }'

Cache Control Options

TypeEffect
no_cacheSkip cache lookup and storage; always get a fresh response
no_storeDon’t store this response in cache
response_onlyOnly use exact match cache (skip semantic)
semantic_onlyOnly use semantic cache (skip exact match)

Cache Feedback

If you receive an incorrect cached response, you can report it: Use the cache-hit request/cache entry identifier from your own organization; arbitrary identifiers are rejected.
curl -X POST "https://api.lemondata.cc/v1/cache/feedback" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "cache_entry_id": "req_1234567890",
    "feedback_type": "wrong_answer",
    "description": "Response was outdated"
  }'
When a cache entry receives enough negative feedback, it is automatically invalidated.

Use Cases

During development, use cache_control: {"type": "no_cache"} to ensure you’re getting fresh API responses.
For real-time data like stock prices or weather, always use no_cache to get current information.
When debugging unexpected responses, use no_cache to rule out cached results.
For more details on caching, see the Caching Guide.