I use this method for Reading all values from Redis, but I am not sure if this is good way:
public List<Value> findAll() { Set<String> allAvailableKeys = redisTemplate.keys("*"); List<Value> valuesList = new ArrayList<Value>(); Iterator<String> itr = allAvailableKeys.iterator(); while (itr.hasNext()) { String id = itr.next(); try { Value value = (Value) hashOperations.get(id, id); valuesList.add(value); } catch (NoSuchElementException e) { // cache could expire in meantime } } return valuesList;