Checkbox 8 supports the use of Redis to enable distributed caching, which can significantly improve performance and scalability in multi-server or high-traffic environments. In this version, caching is configured using a JSON configuration file rather than XML, as used in version 7.
Why Use Distributed Caching?
Distributed caching is most beneficial in environments like web farms, where caching on a single server is insufficient. It's also useful for high-volume deployments or when your infrastructure already includes a caching solution like Redis.
Can I Use a Cloud Hosted Provider Such as AWS ElastiCache?
Yes! If you're hosting Checkbox on AWS, using AWS ElastiCache for Redis is a great option. For best performance, place your ElastiCache instance in the same VPC and subnet as your Checkbox installation.
Setup Instructions
Note: Redis is a third-party tool. Checkbox support cannot help with their installation or debugging. We only support configuration within Checkbox itself.
Step 1: Set Up Redis
Install and configure the cache server of your choice. For best performance, place the caching service on the same local network as your Checkbox servers.
Step 2: Configure Checkbox 8 for Distributed Caching
Before proceeding, ensure your Checkbox 8 environment is working without caching, to make troubleshooting easier if needed.
In Checkbox 8, caching settings are stored in a JSON configuration file, typically located at:
api-core/Configs/caching.json checkbox-service-core/Configs/caching.json
Update this file to specify your cache provider (Redis), along with server details and expiration settings.
Sample JSON Configurations
Redis
Replace HOST_NAME_GOES_HERE with your Redis hostname. Choose a unique database ID for the database field (default is 0).
{
"caching": {
"defaultProvider": "RedisCache",
"memoryCacheProviders": [],
"redisCacheProviders": [
{
"name": "RedisCache",
"connectionString": "HOST_NAME_GOES_HERE:6379",
"database": "0"
}
],
"cacheManagers": [
{
"name": "Reporting",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "ADMembership",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "Tenants",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "AccountSettings",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "MultilingualTexts",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "Surveys",
"provider": "RedisCache",
"expirationMode": "Absolute",
"expirationTimeout": "00:10:00"
},
{
"name": "StyleTemplates",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "ResourceAccess",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "LicenseLimits",
"provider": "RedisCache",
"expirationMode": "Absolute",
"expirationTimeout": "00:05:00"
},
{
"name": "Contacts",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "TenantPhoneNumbers",
"provider": "RedisCache",
"expirationMode": "Sliding",
"expirationTimeout": "00:05:00"
},
{
"name": "OptedOutPhoneNumbers",
"provider": "RedisCache",
"disabled": true
},
{
"name": "TenantVerifiedSenders",
"provider": "RedisCache",
"expirationMode": "Absolute",
"expirationTimeout": "00:05:00"
}
]
}
}
Once you update and save the caching.json file, restart your application (or reload configuration if supported hot-reload is enabled), and verify caching behavior in your environment.
0 Comments