examples-spring-redis-amq
1package com.tasks.cache
2
3import java.io.Serializable
4import java.util.concurrent.ConcurrentHashMap
5
6//@Service
7class HashMapCache : Cache<String> {
8val map = ConcurrentHashMap<String, String>()
9override fun get(key: String): String {
10return map[key].orEmpty()
11}
12
13override fun put(key: String, value: String, expiry:Long) {
14map[key] = value
15}
16
17override fun delete(key: String): String? {
18return map.remove(key)
19}
20}