Alternative method for Jedis.memoryUsage(byte[] key) method which will work on AWS ElastiCache redis
0
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
`
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);
}
`
this method is not compatible with AWS ElastiCache redis Please suggest another method which works.