mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-16 02:41:09 +07:00
optimize: add cache for asset path
This commit is contained in:
@ -154,7 +154,7 @@ func (o *DatReaderOptimizer) loadGeoSite(filename string, code string) (params [
|
||||
if !strings.HasSuffix(filename, ".dat") {
|
||||
filename += ".dat"
|
||||
}
|
||||
filePath, err := assets.GetLocationAsset(o.Logger, filename)
|
||||
filePath, err := assets.DefaultLocationFinder.GetLocationAsset(o.Logger, filename)
|
||||
if err != nil {
|
||||
o.Logger.Debugf("Failed to read geosite \"%v:%v\": %v", filename, code, err)
|
||||
return nil, err
|
||||
@ -199,7 +199,7 @@ func (o *DatReaderOptimizer) loadGeoIp(filename string, code string) (params []*
|
||||
if !strings.HasSuffix(filename, ".dat") {
|
||||
filename += ".dat"
|
||||
}
|
||||
filePath, err := assets.GetLocationAsset(o.Logger, filename)
|
||||
filePath, err := assets.DefaultLocationFinder.GetLocationAsset(o.Logger, filename)
|
||||
if err != nil {
|
||||
o.Logger.Debugf("Failed to read geoip \"%v:%v\": %v", filename, code, err)
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user