• 此项目
    • 正在载入...
  • 登录

allied-creation / character-library-metadata-bastion · 文件

转到一个项目

GitLab

  • 转到群组
  • 项目
  • 活动
  • 文件
  • 提交
  • 管道 0
  • 构建 0
  • 图表
  • 里程碑
  • 问题 0
  • 合并请求 0
  • 成员
  • 标记
  • 维基
  • 派生
  • 网络
  • 创建新的问题
  • character-library-metadata-bastion
  • pkg
  • infrastructure
  • cache
  • local_cache.go
  • feat: user auth integrated
    2fcbecfe
    yangfu 在
    2022-12-09 14:47:16 +0800
    提交 浏览文件
local_cache.go 261 字节
原文件 审查 历史 永久链接
1 2 3 4 5 6 7 8 9 10 11 12 13
package cache

import (
	"fmt"
	cache "github.com/patrickmn/go-cache"
	"time"
)

var DefaultCache = cache.New(12*time.Hour, 1*time.Hour)

func KeyCompanyUser(companyId int, userId int) string {
	return fmt.Sprintf("local:cache:user:%d:%d", companyId, userId)
}