Skip to content

Commit

Permalink
Adding a delete key method.
Browse files Browse the repository at this point in the history
  • Loading branch information
tucker-bluesage committed Dec 9, 2022
1 parent f5d7cb0 commit 66e1484
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/groovy/grails/plugins/redis/RedisService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,17 @@ class RedisService {
}
}

/**
* Deletes key from redis.
*
* @param key The key to delete.
*/
void deleteKey(String key){
withRedis { Jedis redis ->
redis.del(key)
}
}

def memoizeList(String key, Integer expire, Closure closure) {
memoizeList(key, [expire: expire], closure)
}
Expand Down

0 comments on commit 66e1484

Please sign in to comment.