Azure ARM Template unable to alter existing Redis Cache Eviction Policy

Guy le Mar (gmar) 21 Reputation points
2020-07-23T06:00:59.237+00:00

We have an Azure Cache for Redis that was initially created via an ARM template that did not specify the eviction policy ("maxmemory-policy") setting. As a consequence, the cache currently has the default eviction-policy of "volatile-lru". It's a 6Gb Premium-level cache that is only ~500Mb full.

We want to change this from "volatile-lru" to "allkeys-lru".

I altered our (incremental) ARM template, so that it now includes this fragment within the "properties" of the redis cache "resource"...

"redisConfiguration": {
"maxclients": "7500",
"maxmemory-reserved": "200",
"maxfragmentationmemory-reserved": "300",
"maxmemory-policy": "allkeys-lru",
"maxmemory-delta": "200"
},

However, when we 'deploy' this ARM template, it does not alter the eviction-policy setting of the redis cache.

Note that it is possible to alter the eviction-policy via the Azure portal - but this isn't how we'd like to apply the change.

Is the eviction-policy something that can actually be changed via an ARM template? Is so, any ideas why it's not working in my scenario?

thx

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
216 questions
0 comments No comments
{count} votes

Accepted answer
  1. Anurag Sharma 17,571 Reputation points
    2020-07-23T13:38:39.03+00:00

    Hi @GuyleMargmar-2838, apologies you are facing the issue. We would be glad to help you out.

    Please read through the sequence we followed to update the required 'maxmemory-policy' using ARM template:

    1) Export the existing template from Azure Portal of that resource, or if there is an existing template already, please use that:

    13387-image.png

    2) Change the required property and deploy it using template Deployment through Azure Portal. Please mention the same region, resource group etc. that you used it in first place.

    13523-image.png

    3) Please go to resource and property would be updated already:

    13398-image.png

    Please let us know if you are trying any other way to achieve the same and we can figure out the solution on the same.


    If an Answer is helpful, please “Accept Answer” or Up-Vote for the same which might be beneficial to other community members reading this thread.


0 additional answers

Sort by: Most helpful