Skip to main content

Caching

Translazor supports caching to reduce repeated translation requests, improve page performance, and lower translation provider costs.

Instead of translating the same text every time a page is rendered, Translazor can store translated values in your application cache and reuse them on later requests.

Why caching matters

Caching helps you:

  • Reduce calls to the translation provider
  • Improve page loading speed
  • Lower translation API costs
  • Keep translated pages more consistent
  • Avoid translating the same page content repeatedly

For production applications, caching is strongly recommended.

Where cached translations are stored

Cached translations are stored in your application environment, not on Translazor servers.

Depending on your configuration, translations may be stored in:

  • MemoryCache
  • Redis

Translazor does not store your translated page content on Translazor servers.

For more details, see the Privacy & Data Policy.

Supported cache providers

Translazor currently supports:

ProviderRecommended for
MemoryCacheLocal development, small apps, simple deployments
RedisProduction apps, multi-server deployments, scalable apps

MemoryCache

MemoryCache stores translations inside your application process memory.

This is the simplest option and is useful for:

  • Local development
  • Small websites
  • Testing Translazor
  • Single-server deployments

Advantages

  • Simple setup
  • No external infrastructure required
  • Fast access
  • Good for development and small production apps

Limitations

  • Cache is lost when the application restarts
  • Cache is not shared between multiple servers
  • Not ideal for scaled production environments

Example use case

Use MemoryCache when you are testing Translazor or running a simple Blazor Server app on a single server.

{
"Translazor": {
"Cache": {
"Provider": "Memory"
}
}
}