func (c *Config) Refresh() {
	cc := Get()
	*c = *cc
}
Refresh satisfies the cache.Config interface.
package config
import (
	"crypto/rand"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"os"
	"sync"
	"sync/atomic"
	"ktkr.us/pkg/airlift/shorthash"
	"ktkr.us/pkg/gas/auth"
)
var OnSave func(*Config)
var (
	sharedConfig = new(atomic.Value)
	confPath     string
	Default      Config
	mu           = new(sync.RWMutex)
)
func Init(filePath string) error {
	confPath = filePath
	c, err := Load()
	if err != nil {
		return err
	}
	sharedConfig.Store(c)
	return nil
}
type Config struct {
	Host              string `form:"host"`
	Port              int
	Password          []byte
	Salt              []byte
	Directory         string `form:"directory"`
	HashLen           int    `form:"id-size"`
	MaxAgeEnable      bool   `form:"enable-age-prune"`
	Age               int    `form:"max-age"`  
	MaxSizeEnable     bool   `form:"enable-size-prune"`
	Size              int64  `form:"max-size"`      
	AppendExt         bool   `form:"append-ext"`    
	TwitterCardEnable bool   `form:"twitter-card"`  
	TwitterHandle     string `form:"twitter-handle"`
	SyntaxEnable      bool   `form:"syntax-enable"`  
	SyntaxTheme       string `form:"syntax-theme"`   
}
func (c Config) Secrets() (pass, salt []byte, err error) {
	return c.Password, c.Salt, nil
}
func (c Config) Username() string {
	return ""
}
func (c Config) MaxAge() int {
	if c.MaxAgeEnable {
		return c.Age
	}
	return 0
}
func (c Config) MaxSize() int64 {
	if c.MaxSizeEnable {
		return c.Size
	}
	return 0
}
func (c Config) MaxCount() int { return 0 }