add file cache feature for package gfile and remove package gfcache

This commit is contained in:
john
2020-07-16 12:31:13 +08:00
parent f654bb2eda
commit 4dd12434b7
6 changed files with 17 additions and 56 deletions

View File

@ -18,7 +18,6 @@ import (
"github.com/gogf/gf/encoding/gxml"
"github.com/gogf/gf/encoding/gyaml"
"github.com/gogf/gf/internal/rwmutex"
"github.com/gogf/gf/os/gfcache"
"github.com/gogf/gf/os/gfile"
"github.com/gogf/gf/text/gregex"
"github.com/gogf/gf/util/gconv"
@ -99,7 +98,7 @@ func Load(path string, safe ...bool) (*Json, error) {
} else {
path = p
}
return doLoadContent(gfile.Ext(path), gfcache.GetBinContents(path), safe...)
return doLoadContent(gfile.Ext(path), gfile.GetBytesWithCache(path), safe...)
}
// LoadJson creates a Json object from given JSON format content.