AddHash command = new AddHash(id, db, key, values);
command.execute();
if(ttl != -1){
Expire command1 = new Expire(id, db, key, ttl);
command1.execute();
}
}
public void update(int id, int db, String key, Map<String, String> values) {
AddHash command = new AddHash(id, db, key, values);