Skip to content

Commit

Permalink
Merge pull request otale#175 from weihai4099/master
Browse files Browse the repository at this point in the history
🦄 add cache delete key method
  • Loading branch information
hellokaton authored Apr 4, 2017
2 parents ea78d05 + 4501b66 commit 521eaa4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/tale/utils/MapCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public <T> T get(String key) {
if (cacheObject.getExpired() <= 0 || cacheObject.getExpired() > cur) {
Object result = cacheObject.getValue();
return (T) result;
}else{
del(key);
}
}
return null;
Expand Down

0 comments on commit 521eaa4

Please sign in to comment.