title: How to see value stored in Redis cache using Spring Boot
body: <p>I have a Spring Boot application which implemented redis cache to cahce a method output. My use case is to store list of objects when a method is called in cache. My code looks like below.</p>
  
  <pre><code>@Cacheable(value="sec-ques-list")
      @Override
      public List&lt;SecQuestionModel&gt; fetchSecQuestions() {
  
          logger.info("fetchSecQuestions() Starts");
  
          List&lt;SecQuestion&gt; secQuestionsEnty = secQuestionRepository.findAll();
  
          List&lt;SecQuestionModel&gt; secQuesModelList = new ArrayList&lt;&gt;();
  
          if(!CollectionUtils.isEmpty(secQuestionsEnty)){
  
              for(SecQuestion secQuesEnty:secQuestionsEnty){
  
                  SecQuestionModel secQuesModel = new SecQuestionModel();
  
                  secQuesModel.setSecQuesId(secQuesEnty.getId().toString());
                  secQuesModel.setSecQuestion(secQuesEnty.getSecQuestion());
                  secQuesModel.setSecQuestionDesc(secQuesEnty.getSecQuestionDesc());
                  secQuesModel.setCreatedTime(SecQuestionUtil.convertDateTimeToString(secQuesEnty.getCreatedTime()));
                  secQuesModel.setUpdatedTime(SecQuestionUtil.convertDateTimeToString(secQuesEnty.getUpdatedTime()));
                  secQuesModel.setCreatedBy(secQuesEnty.getCreatedBy());
                  secQuesModel.setUpdatedBy(secQuesEnty.getUpdatedBy());
  
                  secQuesModelList.add(secQuesModel);
              }
  
  
          }
          logger.info("fetchSecQuestions() Ends");
          return secQuesModelList;
      }
  </code></pre>
  
  <p>Here my intension is to store my lits of SecQuestionModel in cache with key sec-ques-list. Its working as expected but when I login and see redis cahce I am not able to find this key objects using below command.</p>
  
  <p>LLEN sec-ques-list -> This returns (integer) 0 but I have some objects.</p>
  
  <p>Is my code is actually saving my objects in Redis? or how to see the objects in redis which is stored by spring boot app.</p>