Skip to content
Stand with Ukraine flag

Cache and Redis Configuration

All parameters listed here correspond to settings in tb-edge.yml (or tb-edge.conf on Linux). Set them as environment variables in /etc/tb-edge/conf/tb-edge.conf (Linux) or as container environment variables (Docker / Kubernetes). For instructions on applying changes, see How to change configuration.

ParameterEnv variableDefaultDescription
cache.typeCACHE_TYPEcaffeinecaffeine or redis(7.2 - latest compatible version)
cache.maximumPoolSizeCACHE_MAXIMUM_POOL_SIZE16max pool size to process futures that call the external cache
cache.attributes.enabledCACHE_ATTRIBUTES_ENABLEDtruemake sure that if cache.type is ‘redis’ and cache.attributes.enabled is ‘true’ if you change ‘maxmemory-policy’ Redis config property to ‘allkeys-lru’, ‘allkeys-lfu’ or ‘allkeys-random’
cache.ts_latest.enabledCACHE_TS_LATEST_ENABLEDtrueWill enable cache-aside strategy for SQL timeseries latest DAO. make sure that if cache.type is ‘redis’ and cache.ts_latest.enabled is ‘true’ if you change ‘maxmemory-policy’ Redis config property to ‘allkeys-lru’, ‘allkeys-lfu’ or ‘allkeys-random’
cache.specs.relations.timeToLiveInMinutesCACHE_SPECS_RELATIONS_TTL1440Relations cache TTL
cache.specs.relations.maxSizeCACHE_SPECS_RELATIONS_MAX_SIZE100000 means the cache is disabled
cache.specs.deviceCredentials.timeToLiveInMinutesCACHE_SPECS_DEVICE_CREDENTIALS_TTL1440Device credentials cache TTL
cache.specs.deviceCredentials.maxSizeCACHE_SPECS_DEVICE_CREDENTIALS_MAX_SIZE100000 means the cache is disabled
cache.specs.devices.timeToLiveInMinutesCACHE_SPECS_DEVICES_TTL1440Device cache TTL
cache.specs.devices.maxSizeCACHE_SPECS_DEVICES_MAX_SIZE100000 means the cache is disabled
cache.specs.sessions.timeToLiveInMinutesCACHE_SPECS_SESSIONS_TTL1440Sessions cache TTL
cache.specs.sessions.maxSizeCACHE_SPECS_SESSIONS_MAX_SIZE100000 means the cache is disabled
cache.specs.assets.timeToLiveInMinutesCACHE_SPECS_ASSETS_TTL1440Asset cache TTL
cache.specs.assets.maxSizeCACHE_SPECS_ASSETS_MAX_SIZE100000 means the cache is disabled
cache.specs.customers.timeToLiveInMinutesCACHE_SPECS_CUSTOMERS_TTL1440Customer cache TTL
cache.specs.customers.maxSizeCACHE_SPECS_CUSTOMERS_MAX_SIZE100000 means the cache is disabled
cache.specs.users.timeToLiveInMinutesCACHE_SPECS_USERS_TTL1440User cache TTL
cache.specs.users.maxSizeCACHE_SPECS_USERS_MAX_SIZE100000 means the cache is disabled
cache.specs.entityViews.timeToLiveInMinutesCACHE_SPECS_ENTITY_VIEWS_TTL1440Entity view cache TTL
cache.specs.entityViews.maxSizeCACHE_SPECS_ENTITY_VIEWS_MAX_SIZE100000 means the cache is disabled
cache.specs.claimDevices.timeToLiveInMinutesCACHE_SPECS_CLAIM_DEVICES_TTL1440Claim devices cache TTL
cache.specs.claimDevices.maxSizeCACHE_SPECS_CLAIM_DEVICES_MAX_SIZE10000 means the cache is disabled
cache.specs.securitySettings.timeToLiveInMinutesCACHE_SPECS_SECURITY_SETTINGS_TTL1440Security settings cache TTL
cache.specs.securitySettings.maxSizeCACHE_SPECS_SECURITY_SETTINGS_MAX_SIZE100000 means the cache is disabled
cache.specs.tenantProfiles.timeToLiveInMinutesCACHE_SPECS_TENANT_PROFILES_TTL1440Tenant profiles cache TTL
cache.specs.tenantProfiles.maxSizeCACHE_SPECS_TENANT_PROFILES_MAX_SIZE100000 means the cache is disabled
cache.specs.tenants.timeToLiveInMinutesCACHE_SPECS_TENANTS_TTL1440Tenant cache TTL
cache.specs.tenants.maxSizeCACHE_SPECS_TENANTS_MAX_SIZE100000 means the cache is disabled
cache.specs.tenantsExist.timeToLiveInMinutesCACHE_SPECS_TENANTS_TTL1440Environment variables are intentionally the same as in ‘tenants’ cache to be equal.
cache.specs.tenantsExist.maxSizeCACHE_SPECS_TENANTS_MAX_SIZE100000 means the cache is disabled
cache.specs.deviceProfiles.timeToLiveInMinutesCACHE_SPECS_DEVICE_PROFILES_TTL1440Device profile cache TTL
cache.specs.deviceProfiles.maxSizeCACHE_SPECS_DEVICE_PROFILES_MAX_SIZE100000 means the cache is disabled
cache.specs.assetProfiles.timeToLiveInMinutesCACHE_SPECS_ASSET_PROFILES_TTL1440Asset profile cache TTL
cache.specs.assetProfiles.maxSizeCACHE_SPECS_ASSET_PROFILES_MAX_SIZE100000 means the cache is disabled
cache.specs.notificationSettings.timeToLiveInMinutesCACHE_SPECS_NOTIFICATION_SETTINGS_TTL10Notification settings cache TTL
cache.specs.notificationSettings.maxSizeCACHE_SPECS_NOTIFICATION_SETTINGS_MAX_SIZE10000 means the cache is disabled
cache.specs.sentNotifications.timeToLiveInMinutesCACHE_SPECS_SENT_NOTIFICATIONS_TTL1440Sent notifications cache TTL
cache.specs.sentNotifications.maxSizeCACHE_SPECS_SENT_NOTIFICATIONS_MAX_SIZE100000 means the cache is disabled
cache.specs.attributes.timeToLiveInMinutesCACHE_SPECS_ATTRIBUTES_TTL1440Attributes cache TTL
cache.specs.attributes.maxSizeCACHE_SPECS_ATTRIBUTES_MAX_SIZE1000000 means the cache is disabled
cache.specs.tsLatest.timeToLiveInMinutesCACHE_SPECS_TS_LATEST_TTL1440Timeseries latest cache TTL
cache.specs.tsLatest.maxSizeCACHE_SPECS_TS_LATEST_MAX_SIZE1000000 means the cache is disabled
cache.specs.userSessionsInvalidation.timeToLiveInMinutes_(none)_"0"The value of this TTL is ignored and replaced by the JWT refresh token expiration time
cache.specs.userSessionsInvalidation.maxSizeCACHE_SPECS_USERS_UPDATE_TIME_MAX_SIZE100000 means the cache is disabled
cache.specs.otaPackages.timeToLiveInMinutesCACHE_SPECS_OTA_PACKAGES_TTL60Ota packages cache TTL
cache.specs.otaPackages.maxSizeCACHE_SPECS_OTA_PACKAGES_MAX_SIZE100 means the cache is disabled
cache.specs.otaPackagesData.timeToLiveInMinutesCACHE_SPECS_OTA_PACKAGES_DATA_TTL60Ota packages data cache TTL
cache.specs.otaPackagesData.maxSizeCACHE_SPECS_OTA_PACKAGES_DATA_MAX_SIZE100 means the cache is disabled
cache.specs.edges.timeToLiveInMinutesCACHE_SPECS_EDGES_TTL1440Edges cache TTL
cache.specs.edges.maxSizeCACHE_SPECS_EDGES_MAX_SIZE100000 means the cache is disabled
cache.specs.edgeSessions.timeToLiveInMinutesCACHE_SPECS_EDGE_SESSIONS_TTL0Edge Sessions cache TTL; no expiration time if set to ‘0’
cache.specs.edgeSessions.maxSizeCACHE_SPECS_EDGE_SESSIONS_MAX_SIZE100000 means the cache is disabled
cache.specs.relatedEdges.timeToLiveInMinutesCACHE_SPECS_RELATED_EDGES_TTL1440Related Edges cache TTL
cache.specs.relatedEdges.maxSizeCACHE_SPECS_RELATED_EDGES_MAX_SIZE100000 means the cache is disabled
cache.specs.repositorySettings.timeToLiveInMinutesCACHE_SPECS_REPOSITORY_SETTINGS_TTL1440Repository settings cache TTL
cache.specs.repositorySettings.maxSizeCACHE_SPECS_REPOSITORY_SETTINGS_MAX_SIZE100000 means the cache is disabled
cache.specs.autoCommitSettings.timeToLiveInMinutesCACHE_SPECS_AUTO_COMMIT_SETTINGS_TTL1440Autocommit settings cache TTL
cache.specs.autoCommitSettings.maxSizeCACHE_SPECS_AUTO_COMMIT_SETTINGS_MAX_SIZE100000 means the cache is disabled
cache.specs.twoFaVerificationCodes.timeToLiveInMinutesCACHE_SPECS_TWO_FA_VERIFICATION_CODES_TTL60Two factor verification codes cache TTL
cache.specs.twoFaVerificationCodes.maxSizeCACHE_SPECS_TWO_FA_VERIFICATION_CODES_MAX_SIZE1000000 means the cache is disabled
cache.specs.versionControlTask.timeToLiveInMinutesCACHE_SPECS_VERSION_CONTROL_TASK_TTL20Version control task cache TTL
cache.specs.versionControlTask.maxSizeCACHE_SPECS_VERSION_CONTROL_TASK_MAX_SIZE1000000 means the cache is disabled
cache.specs.userSettings.timeToLiveInMinutesCACHE_SPECS_USER_SETTINGS_TTL1440User settings cache TTL
cache.specs.userSettings.maxSizeCACHE_SPECS_USER_SETTINGS_MAX_SIZE1000000 means the cache is disabled
cache.specs.dashboardTitles.timeToLiveInMinutesCACHE_SPECS_DASHBOARD_TITLES_TTL1440Dashboard titles cache TTL
cache.specs.dashboardTitles.maxSizeCACHE_SPECS_DASHBOARD_TITLES_MAX_SIZE1000000 means the cache is disabled
cache.specs.entityCount.timeToLiveInMinutesCACHE_SPECS_ENTITY_COUNT_TTL1440Entity count cache TTL
cache.specs.entityCount.maxSizeCACHE_SPECS_ENTITY_COUNT_MAX_SIZE1000000 means the cache is disabled
cache.specs.resourceInfo.timeToLiveInMinutesCACHE_SPECS_RESOURCE_INFO_TTL1440Resource info cache TTL
cache.specs.resourceInfo.maxSizeCACHE_SPECS_RESOURCE_INFO_MAX_SIZE1000000 means the cache is disabled
cache.specs.alarmTypes.timeToLiveInMinutesCACHE_SPECS_ALARM_TYPES_TTL60Alarm types cache TTL
cache.specs.alarmTypes.maxSizeCACHE_SPECS_ALARM_TYPES_MAX_SIZE100000 means the cache is disabled
cache.specs.mobileAppSettings.timeToLiveInMinutesCACHE_SPECS_MOBILE_APP_SETTINGS_TTL1440Mobile application cache TTL
cache.specs.mobileAppSettings.maxSizeCACHE_SPECS_MOBILE_APP_SETTINGS_MAX_SIZE100000 means the cache is disabled
cache.specs.mobileSecretKey.timeToLiveInMinutesCACHE_MOBILE_SECRET_KEY_TTL2QR secret key cache TTL
cache.specs.mobileSecretKey.maxSizeCACHE_MOBILE_SECRET_KEY_MAX_SIZE100000 means the cache is disabled
cache.notificationRules.timeToLiveInMinutesCACHE_SPECS_NOTIFICATION_RULES_TTL30Notification rules cache TTL
cache.notificationRules.maxSizeCACHE_SPECS_NOTIFICATION_RULES_MAX_SIZE10000 means the cache is disabled
cache.rateLimits.timeToLiveInMinutesCACHE_SPECS_RATE_LIMITS_TTL120Rate limits cache TTL
cache.rateLimits.maxSizeCACHE_SPECS_RATE_LIMITS_MAX_SIZE2000000 means the cache is disabled
cache.entityLimits.timeToLiveInMinutesCACHE_SPECS_ENTITY_LIMITS_TTL5Entity limits cache TTL
cache.entityLimits.maxSizeCACHE_SPECS_ENTITY_LIMITS_MAX_SIZE1000000 means the cache is disabled
cache.image.etag.timeToLiveInMinutesCACHE_SPECS_IMAGE_ETAGS_TTL44640Image ETags cache TTL
cache.image.etag.maxSizeCACHE_SPECS_IMAGE_ETAGS_MAX_SIZE100000 means the cache is disabled
cache.image.systemImagesBrowserTtlInMinutesCACHE_SPECS_IMAGE_SYSTEM_BROWSER_TTL0Browser cache TTL for system images in minutes. 0 means the cache is disabled
cache.image.tenantImagesBrowserTtlInMinutesCACHE_SPECS_IMAGE_TENANT_BROWSER_TTL0Browser cache TTL for tenant images in minutes. 0 means the cache is disabled
ParameterEnv variableDefaultDescription
spring.data.redis.repositories.enabled_(none)_falseDisable this because it is not required.
ParameterEnv variableDefaultDescription
redis.connection.typeREDIS_CONNECTION_TYPEstandaloneRedis deployment type: Standalone (single Redis node deployment) OR Cluster
redis.standalone.hostREDIS_HOSTlocalhostRedis connection host
redis.standalone.portREDIS_PORT6379Redis connection port
redis.standalone.useDefaultClientConfigREDIS_USE_DEFAULT_CLIENT_CONFIGtrueUse the default Redis configuration file
redis.standalone.clientNameREDIS_CLIENT_NAMEstandaloneThis value may be used only if you used not default ClientConfig
redis.standalone.connectTimeoutREDIS_CLIENT_CONNECT_TIMEOUT30000This value may be used only if you used not default ClientConfig
redis.standalone.readTimeoutREDIS_CLIENT_READ_TIMEOUT60000This value may be used only if you used not default ClientConfig
redis.standalone.usePoolConfigREDIS_CLIENT_USE_POOL_CONFIGfalseThis value may be used only if you used not default ClientConfig
redis.cluster.nodesREDIS_NODES_(empty)_Comma-separated list of “host:port” pairs to bootstrap from.
redis.cluster.max-redirectsREDIS_MAX_REDIRECTS12Maximum number of redirects to follow when executing commands across the cluster.
redis.cluster.useDefaultPoolConfigREDIS_USE_DEFAULT_POOL_CONFIGtrueif set false will be used pool config build from values of the pool config section
redis.sentinel.masterREDIS_MASTER_(empty)_name of the master node
redis.sentinel.sentinelsREDIS_SENTINELS_(empty)_comma-separated list of “host:port” pairs of sentinels
redis.sentinel.passwordREDIS_SENTINEL_PASSWORD_(empty)_password to authenticate with sentinel
redis.sentinel.useDefaultPoolConfigREDIS_USE_DEFAULT_POOL_CONFIGtrueif set false will be used pool config build from values of the pool config section
redis.dbREDIS_DB0db index
redis.passwordREDIS_PASSWORD_(empty)_db password
redis.ssl.enabledTB_REDIS_SSL_ENABLEDfalseEnable/disable secure connection
redis.ssl.credentials.cert_fileTB_REDIS_SSL_PEM_CERT_(empty)_Path redis server (CA) certificate
redis.ssl.credentials.user_cert_fileTB_REDIS_SSL_PEM_KEY_(empty)_Path to user certificate file. This is optional for the client and can be used for two-way authentication for the client
redis.ssl.credentials.user_key_fileTB_REDIS_SSL_PEM_KEY_PASSWORD_(empty)_Path to user private key file. This is optional for the client and only needed if ‘user_cert_file’ is configured.
redis.pool_config.maxTotalREDIS_POOL_CONFIG_MAX_TOTAL128Maximum number of connections that can be allocated by the connection pool
redis.pool_config.maxIdleREDIS_POOL_CONFIG_MAX_IDLE128Maximum number of idle connections that can be maintained in the pool without being closed
redis.pool_config.minIdleREDIS_POOL_CONFIG_MIN_IDLE16Minumum number of idle connections that can be maintained in the pool without being closed
redis.pool_config.testOnBorrowREDIS_POOL_CONFIG_TEST_ON_BORROWtrueEnable/Disable PING command sent when a connection is borrowed
redis.pool_config.testOnReturnREDIS_POOL_CONFIG_TEST_ON_RETURNtrueThe property is used to specify whether to test the connection before returning it to the connection pool.
redis.pool_config.testWhileIdleREDIS_POOL_CONFIG_TEST_WHILE_IDLEtrueThe property is used in the context of connection pooling in Redis
redis.pool_config.minEvictableMsREDIS_POOL_CONFIG_MIN_EVICTABLE_MS60000Minimum time that an idle connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds
redis.pool_config.evictionRunsMsREDIS_POOL_CONFIG_EVICTION_RUNS_MS30000Specifies the time interval in milliseconds between two consecutive eviction runs
redis.pool_config.maxWaitMillsREDIS_POOL_CONFIG_MAX_WAIT_MS60000Maximum time in milliseconds where a client is willing to wait for a connection from the pool when all connections are exhausted
redis.pool_config.numberTestsPerEvictionRunREDIS_POOL_CONFIG_NUMBER_TESTS_PER_EVICTION_RUN3Specifies the number of connections to test for eviction during each eviction run
redis.pool_config.blockWhenExhaustedREDIS_POOL_CONFIG_BLOCK_WHEN_EXHAUSTEDtrueDetermines the behavior when a thread requests a connection from the pool, but there are no available connections, and the pool cannot create more due to the maxTotal configuration
redis.evictTtlInMsREDIS_EVICT_TTL_MS60000TTL for short-living SET commands that are used to replace DEL to enable transaction support