While using memoryUsage(key)
method of Jedis i am getting this following error"errorMessage": "ERR unknown command 'memory', with args beginning with: USAGE"is it possible that this method is not allowed on AWS ElastiCache
Expected behaviorI should retrieve the memory used by key-value in cache
Actual behaviorgetting this error : "ERR unknown command 'memory', with args beginning with: USAGE"
Steps to reproduce:
public Long getValueSize(String hashKey, Jedis jedis) { log.info("Request received to get memory usage from redis for key {}", hashKey); byte[] serializeKey = kryo.serialize(hashKey); return jedis.memoryUsage(serializeKey);}
i am using JedisPool from which i am taking a Jedis instance to perform this action.
Redis / Jedis ConfigurationJedis library version: 5.1.2ElastiCache version: 7.1.0Java version: 17
When i tried it locally with dockerized environment, where my java client was running as a lambda inside a docker container and redis instance was also running in a container at that time i am not getting such error and obtaining the expected result and on aws environment where i have ElastiCache instead of Redis i am getting this error as a response.
I believe it might be case that this particular method is not compatible with AWS ElastiCache but i am not sure of it as i am using it first time.
Thanks in advance :)