🐎 加入缓存
This commit is contained in:
@@ -15,6 +15,12 @@ type Config struct {
|
||||
Search bool `yaml:"search" json:"search"`//允许搜索
|
||||
Static string `yaml:"static"`
|
||||
} `yaml:"server"`
|
||||
Cache struct{
|
||||
Enable bool `yaml:"cache"`
|
||||
Expiration int `yaml:"expiration"`
|
||||
CleanupInterval int `yaml:"cleanup_interval"`
|
||||
RefreshPassword string `yaml:"refresh_password"`
|
||||
}
|
||||
AliDrive struct{
|
||||
ApiUrl string `yaml:"api_url"`//阿里云盘api
|
||||
RootFolder string `yaml:"root_folder"`//根目录id
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/patrickmn/go-cache"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -10,6 +11,8 @@ var(
|
||||
Con string
|
||||
Client *http.Client
|
||||
Authorization string
|
||||
|
||||
Cache *cache.Cache
|
||||
)
|
||||
|
||||
var Conf = new(Config)
|
||||
|
Reference in New Issue
Block a user