cache.go 375 B

123456789101112131415
  1. package store
  2. import (
  3. "fmt"
  4. "github.com/usememos/memos/api"
  5. )
  6. func getUserSettingCacheKey(userSetting userSettingRaw) string {
  7. return fmt.Sprintf("%d-%s", userSetting.UserID, userSetting.Key.String())
  8. }
  9. func getUserSettingFindCacheKey(userSettingFind *api.UserSettingFind) string {
  10. return fmt.Sprintf("%d-%s", userSettingFind.UserID, userSettingFind.Key.String())
  11. }