All Products
Search
Document Center

PolarDB:Polar.ai.lru_entity_size

Last Updated:Mar 28, 2026

Controls the number of AI model metadata entries that PolarDB caches in an LRU (Least Recently Used) cache, reducing reads to the model metadata table.

Data type

integer

Values

  • Default: 4

  • Minimum: 0

  • Maximum: 100

Description

By default, PolarDB caches metadata for up to 4 models. Increase this value when your workload accesses more models concurrently to reduce repeated reads to the model metadata table.

Important

A change to polar.ai.lru_entity_size takes effect only after you reconnect to the database.

Examples

Set the cache size for the current session:

SET polar.ai.lru_entity_size = 8;

Set the cache size for all new connections to a specific database:

ALTER DATABASE database_name SET polar.ai.lru_entity_size = 10;