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
asked a month ago86 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions