better code

This commit is contained in:
devezhao 2020-12-16 23:10:14 +08:00
parent 2388d0dfe2
commit b110651cba
2 changed files with 6 additions and 4 deletions

2
@rbv

@ -1 +1 @@
Subproject commit 1e3c69cea614dddb82b88a76406ed60767b91ebe Subproject commit c95ee7a627d50df83e3a9ca5b7f5f68616d876e7

View file

@ -77,9 +77,11 @@ public class KVStorage {
if (Application.isReady()) { if (Application.isReady()) {
// 0. 从缓存 // 0. 从缓存
value = Application.getCommonsCache().get(key); if (!noCache) {
if (value != null && !noCache) { value = Application.getCommonsCache().get(key);
return value; if (value != null) {
return value;
}
} }
// 1. 从数据库 // 1. 从数据库