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.

patrick
已提问 2 个月前108 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则