| package com.mzl.flower.base.cache; | 
|   | 
| import org.springframework.stereotype.Component; | 
|   | 
| import java.util.concurrent.TimeUnit; | 
|   | 
| @Component | 
| public class StringCacheClient extends BaseCacheClient { | 
|   | 
|     public void set(String key, String value) { | 
|         this.valueOperations.set(this.getKey(new String[]{key}), value); | 
|     } | 
|   | 
|     public void set(String key, String value, long timeout) { | 
|         this.valueOperations.set(this.getKey(new String[]{key}), value, timeout, TimeUnit.SECONDS); | 
|     } | 
|   | 
|     public String get(String key) { | 
|         return (String)this.valueOperations.get(this.getKey(new String[]{key})); | 
|     } | 
|   | 
|     public void delete(String key) { | 
|         this.stringRedisTemplate.delete(this.getKey(new String[]{key})); | 
|     } | 
|   | 
| } |