Page cover image

Cache - Azure Cache for Redis

Here, you can find a tutorial on how to setup a Redis Cache on Azure to work with DecisionRules.

Creating Azure Cache for Redis

After navigating navigating to Azure Cache for Redis, hit Create. In the following screen assign your Resource group, give the cache a DNS name, choose a location and assing the Standard C1 type. The type selection is up to you but we recommend a cache with at least 1GB of storage.

Next up is the Networking settings.

It is recommended to use a Private Endpoint connection but for hassle free non-Prod environment deployments a Public Endpoint is also an option.

After selecting Private Endpoint click Add private endpoint and fill in the settings. Location and resource group settings should correspond to those of your server containers'.

Keep the rest of the settings default unless your use-case demands otherwise. Optionally also add tags for easier resource management.

Validate your settings and create the cache.

Necessary settings and connection strings

Maxmemory policy

After the cache has been provisioned, navigate to it's Settings/Advanced Settings tab. Once there, change the Maxmemory policy to allkeys-lru or allkeys-lfu.

Connection string

The format of your connection string will depend on whether you're using SSL or non-SSL connection.

  • SSL - rediss://:<access_key>@<hostname>:<port>

  • Non-SSL - redis://:<access_key>@<hostname>:<port>

Note the difference is in the first part of the string rediss:// x redis://.

  • You can find the <access_key> under Settings / Access keys

  • You can find the <hostname> and <port> under Settings / Properties

Azure Cache for Redis tends to idle after a period of inactivity (10 minutes). To prevent this, and the corresponding expensive cache misses, we recommend setting the REDIS_PING_INTERVAL optional Environment Variable.

Last updated

Change request #843: Audit API chages