Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

v2.1.3

Compare
Choose a tag to compare
@qwqcode qwqcode released this 23 Apr 16:58
· 103 commits to master since this release
v2.1.3
fd1be63

Changelog

增加缓存性能优化

性能优化,大幅提高 QPS,支持 BigCache (内建默认)、Redis、Memcache

# 缓存
cache:
  type: "builtin" # 支持 redis, memcache, builtin (自带缓存)
  expires: 30     # 缓存过期时间 (单位:分钟)
  warm_up: false  # 程序启动时预热缓存
  server: ""      # 连接缓存服务器 (例如:"localhost:6379")

d1986c4 feat(cache): Almost full cache coverage
72d205f feat(cache): Support redis & memcache
5cd0129 feat(cache): Replace built-in json lib with vmihailenco/msgpack to speed up
ff03509 fix(admin_edit): Remove cache before admin_edit
3f1313a fix(cache): ChildCommentCacheSave repeatedly cache while exist
dcde2b4 feat: FindCommentChildren query db while cache miss
9ab36c6 fix: Add lock in ChildCommentCacheSave
323455c fix: Add lock prevent query db repeatedly while cache miss
0ab5d1f fix: Cache add mutex lock
11d107e feat(api_admin_cache): Add api handle cache

提升数据库兼容性

支持 SQLite, MySQL, Postgres, SQLServer

# 数据库
db:
  type: "sqlite" # 支持 sqlite, mysql, pgsql, mssql
  file: "./data/artalk-go.db" # sqlite 数据库文件
  name: "artalk"     # 数据库名
  host: "localhost"  # 地址
  port: "3306"       # 端口
  user: "root"       # 账号
  password: ""       # 密码
  charset: "utf8mb4" # 编码格式
  table_prefix: ""   # 表前缀 (例如:"atk_")

0529746 feat(conf): 配置文件增加数据库配置项
9ca2a80 feat(db): 支持设置表前缀
a27b015 fix(db): Fix query syntax error & importer vote recover.
5a1b361 fix(db): Support postgres database.
fd1be63 fix(db): Time type field use pointer to solve 0000-00-00 issue.

其他

177ca04 feat(importer): 导入功能优化,加快速度,修复 bug
446213b fix(conf_admins): 不再删除数据库中,不存在于配置文件的管理员账户
95e387f feat(upgit): 增加 img_upload.upgit.del_local: true 配置项上传后删除本地图片

配置文件变动

新增 cache 配置项,db 配置项发生较大变化。

参考:https://github.com/ArtalkJS/ArtalkGo/blob/master/artalk-go.example.yml

该版配置文件向下兼容,原文件无需修改,cache 使用默认配置。