Skip to main content

Caching

Langbly caches translations in Redis to reduce latency and upstream costs.

What’s cached​

  • The per-string result (translatedText, and detectedSourceLanguage when applicable)
  • Cache key is based on: source (or auto), target, format, exact input-array boundaries, and output-affecting options such as formality, glossary, context, and custom instructions
  • Plain requests without account-specific customization may use a hashed cross-account key; requests with glossaries, instructions, context, or account translation memory stay account-scoped

TTL (default)​

  • 1 hour for eligible translation results
  • 24 hours for responses stored under an idempotency key

If you need caching disabled or a different TTL, contact support@langbly.com.

Frequently asked questions​

Why does the cache miss when I split or merge my input array, even though the text is the same?​

The cache key includes the exact boundaries of the input array (q parameter). Splitting or merging the same texts into a different array produces a different key, so the cache does not match. Send identical array structures to get a cache hit.

Can a cross-account cache hit expose my glossary, custom instructions, or other account-specific data?​

No. Account-scoped data (glossaries, context, custom instructions, translation memory) never enters the shared cache. A cross-account hit only serves results from requests without any account-specific settings. Your data stays private.

Does caching reduce my billing character count?​

No. Caching saves latency and reduces redundant processing, but billing is based on the full text you send in each request. Each request, cached or not, counts toward your usage.

How long do cached results live, and can I change the TTL?​

Default TTL is 1 hour for standard results and 24 hours for idempotency-key responses. To disable caching or request a different TTL, contact support@langbly.com.