Spring Data Redis Expire Key : <p>I have a One Spring Hibernate Application. In my application, Recently i am implemented Spring data Redis.</p>

<pre><code>spring-servlet.xml
&lt;!-- redis connection factory --&gt;
&lt;bean id="jedisConnFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" p:use-pool="true"/&gt;

&lt;!-- redis template definition --&gt;
&lt;bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate" 
    p:connection-factory-ref="jedisConnFactory"/&gt;
</code></pre>

<p>And this <code>redisTemplate</code> use in my ServiceImpl class.</p>

<pre><code>RedisServiceImpl

@Autowired
private RedisTemplate&lt;String, T&gt; redisTemplate;

public RedisTemplate&lt;String, T&gt; getRedisTemplate() {
    return redisTemplate;
}

public void setRedisTemplate(RedisTemplate&lt;String, T&gt; redisTemplate) {
    this.redisTemplate = redisTemplate;
}
</code></pre>

<p>Now I added data in redisServer like this</p>

<pre><code>public void putData(String uniqueKey, String key, Object results) {

    redisTemplate.opsForHash().put(uniqueKey, key, results);
}
</code></pre>

<p>Now i want to remove Expire key.</p>

<p>I search in Google, But in google all are saying like this</p>

<pre><code>redisTemplate.expire(key, timeout, TimeUnit);
</code></pre>

<p>In this expire method, We need to provide <code>uniqueKey</code> instead of <code>key</code>.
But I need to Expire <code>key</code> instead of <code>uniqueKey</code>.</p>

<p>So Please help me what can i do for expire <code>Key</code>?</p>
