title: Spring Boot Redis Refresh/Reset Every Day or Every Hour According To TimeToLive
body: <p>I have a RedisHash code like below:</p>
  <pre><code>@Data
  @AllArgsConstructor
  @NoArgsConstructor
  @RedisHash(value = &quot;ApiKey&quot;)
  public class CreditRedis
  {
      @Id
      private String id;//apiKey
      private Integer credit;
  
      private Long period;
  
      @TimeToLive
      private Long expiration;
  }
  </code></pre>
  <p>If I set it today 10PM with 100 credit and 1Day period, then I want to  reset credit tomorrow 10PM automatically.</p>
  <p>Example Cases:</p>
  <pre><code>new CreditRedis(&quot;1&quot;, 1000, 1Day, 1Day); -&gt; at the end of the 1 Day credit will be reset...
  new CreditRedis(&quot;1&quot;, 100, 1Hour, 1Hour); -&gt; at the end of the 1 Hour credit will be reset...
  new CreditRedis(&quot;1&quot;, 10, 10Min, 10Min); -&gt; at the end of the 10 Min credit will be reset...
  </code></pre>
  <p>Is there a way to implement in on redis or spring-boot?</p>