From 0d19e05fb4d57a23b22d9f098bba871b65535d15 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 17 Sep 2018 09:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bgcache=E5=BA=95=E5=B1=82?= =?UTF-8?q?=E5=AF=B9=E8=B1=A1=E7=BB=A7=E6=89=BF=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- g/os/gcache/gcache_cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g/os/gcache/gcache_cache.go b/g/os/gcache/gcache_cache.go index bd3e3a6c6..4d423ff76 100644 --- a/g/os/gcache/gcache_cache.go +++ b/g/os/gcache/gcache_cache.go @@ -14,13 +14,13 @@ import ( // 缓存对象。 // 底层只有一个缓存对象,如果需要提高并发性能,可新增缓存对象无锁哈希表,用键名做固定分区。 type Cache struct { - *memCache // 底层缓存对象 + memCache } // Cache对象按照缓存键名首字母做了分组 func New() *Cache { return &Cache { - memCache : newMemCache(), + memCache : *newMemCache(), } }