code: private void saveSession(Session session) throws UnknownSessionException{
  		if(session == null || session.getId() == null){
  			logger.error("session or session id is null");
  			return;
  		}
  		
  		byte[] key = getByteKey(session.getId());
  		byte[] value = SerializeUtils.serialize(session);
  		
  		
  		session.setTimeout(this.getExpire()*1000);		
  		
  		if(redisTemplate!=null) {
  			redisTemplate.opsForValue().set(getKey(session.getId()), value, this.getExpire(), TimeUnit.SECONDS);
  		}else {
  			this.redisManager.set(key, value, this.getExpire());
  		}
  		
  	}
docs: save session
  @param session
  @throws UnknownSessionException