修复getDel问题

This commit is contained in:
redkale
2023-07-18 07:33:22 +08:00
parent 222969e8a3
commit 8ccea3750e

View File

@@ -664,7 +664,8 @@ public final class CacheMemorySource extends AbstractCacheSource {
@Override
public <T> CompletableFuture<T> getDelAsync(String key, Type type) {
return supplyAsync(() -> {
return (T) container.remove(key);
CacheEntry entry = container.remove(key);
return entry == null ? null : (T) entry.objectValue;
}, getExecutor());
}