Skip to content

Commit 5780292

Browse files
committed
docs: refresh lite deployment and README branding
- update README and DEPLOYMENT to match the lite workflow and branch wording - add the new brand image and use it in the README hero section
1 parent 6f0d588 commit 5780292

3 files changed

Lines changed: 82 additions & 70 deletions

File tree

DEPLOYMENT.md

Lines changed: 62 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,12 @@
3737

3838
- `Account Settings: Read`
3939
- `Workers Scripts: Edit`
40-
- `Workers KV Storage: Edit`
4140
- `D1: Edit`
4241

4342
如果你要启用 Logo 持久化,再额外加:
4443

4544
- `Workers R2 Storage: Edit`
4645

47-
如果你以后还要绑定自定义域名 / Route,再额外加:
48-
49-
- `Workers Routes: Edit`
50-
5146
建议把资源范围限制在你自己的目标 Account。
5247

5348
### 4. Cloudflare Account ID
@@ -101,7 +96,7 @@
10196
在你自己的 fork 仓库中:
10297

10398
1. 打开 **Actions**
104-
2. 选择 **Deploy to Cloudflare**
99+
2. 选择 **Lite CI and Deploy**
105100
3. 点击 **Run workflow**
106101

107102
这一步不需要再填写额外参数。
@@ -124,9 +119,9 @@
124119

125120
同步上游代码后,会自动触发:
126121

127-
- `Deploy to Cloudflare`
122+
- `Lite CI and Deploy`
128123

129-
也就是说,正常情况下你后面不需要再手工重复部署。
124+
也就是说,正常情况下你后面不需要再手工重复部署;同一个 workflow 会先跑 CI,验证通过后再执行部署
130125

131126
只要这些不变:
132127

@@ -186,45 +181,82 @@ https://api.resend.com/emails
186181

187182
---
188183

189-
## 八、Worker Lite 的性能取舍
184+
## 八、当前分支能力边界
185+
186+
### 支持
187+
188+
- 登录
189+
- 订阅管理
190+
- 标签
191+
- 统计
192+
- 日历
193+
- 汇率刷新
194+
- Webhook
195+
- PushPlus
196+
- Telegram
197+
- Resend 邮件
198+
- AI 文本 / 图片识别
199+
- Wallos JSON / SQLite / ZIP 导入
200+
201+
### 不支持
202+
203+
- 本地 OCR
204+
- 原生 SMTP
205+
206+
---
207+
208+
## 九、Worker Lite 的性能取舍
190209

191210
这个分支面向 **Cloudflare Worker Free**,因此实现上做了明确的 Lite 化裁剪,而不是完全复刻 Docker 版的运行模型。
192211

193-
### 1. isolate 内存短 TTL 缓存
212+
### 1. L1 isolate 内存 + L2 D1 持久缓存
194213

195-
以下读取类接口默认会缓存 **30 秒**
214+
当前热点读取接口使用两级缓存:
215+
216+
- **L1:当前 isolate 内存缓存**
217+
- **L2:D1 `ComputedCache` 持久缓存**
218+
- **L1 命中窗口固定较短**,并且不会超过对应 D1 条目的剩余有效期
219+
220+
目前接入 D1 二级缓存的接口是:
221+
222+
- `/settings`(5 分钟)
223+
- `/exchange-rates/latest`(5 分钟)
224+
- `/statistics/overview`(5 分钟)
225+
- `/statistics/budgets`(15 分钟)
226+
- `/calendar/events`(10 分钟)
227+
228+
仍保留短 TTL 内存缓存的读取接口包括:
196229

197-
- `/settings`
198230
- `/tags`
199231
- `/subscriptions`
200-
- `/statistics/overview`
201-
- `/statistics/budgets`
202-
- `/exchange-rates/latest`
203-
- `/calendar/events`
204232

205233
这样做的原因是:
206234

207235
- Worker Free 每次 HTTP 请求只有 **10ms CPU**
208236
- 同一页面会并发读取多份数据
209237
- 如果每次都实时重算,很容易撞上 `Worker exceeded CPU time limit`
238+
- D1 读额度相对充裕,适合承担热点聚合结果的二级缓存
210239
- 同时避免继续消耗 KV Free 的每日写入额度
211240

212-
这 30 秒缓存的副作用是
241+
这套缓存的副作用是
213242

214-
- 刚修改完数据后,其他页面在极短时间内可能看到旧数据
215-
- 统计页、日历页、标签页在 30 秒窗口内可能不是绝对实时
216-
- 这是 isolate 级缓存,不保证跨实例强一致
243+
- 正常写操作后,统计/日历/汇率相关接口通常会立即切到新版本缓存,而不是机械地等 TTL 过期
244+
- 真正可能自然短暂变旧的主要是 `/statistics/overview`,在无写操作场景下最多约 5 分钟
245+
- `/statistics/budgets``/calendar/events` 更依赖 version bump,正常情况下不应频繁看到明显旧值
246+
- L1 仍是 isolate 级缓存,不保证跨实例强一致
247+
- D1 二级缓存会跨 isolate 复用,但通过版本号失效而不是逐条删除
217248

218249
当前实现已经对主要写操作做了主动失效,所以正常情况下:
219250

220-
- 保存设置后,会刷新 settings / statistics / exchange-rates
221-
- 修改标签后,会刷新 tags / subscriptions / statistics
222-
- 修改订阅后,会刷新 subscriptions / statistics / calendar
223-
- Wallos 导入提交后,会刷新 subscriptions / tags / statistics / calendar
251+
- 保存设置后,会刷新 settings / statistics / calendar / exchange-rates,并 bump `cacheVersion.settings` / `cacheVersion.statistics` / `cacheVersion.calendar` / `cacheVersion.exchangeRates`
252+
- 修改标签后,会刷新 tags / subscriptions / statistics,并 bump `cacheVersion.statistics`
253+
- 修改订阅后,会刷新 subscriptions / statistics / calendar,并 bump `cacheVersion.statistics` / `cacheVersion.calendar`
254+
- Wallos 导入提交后,会刷新 subscriptions / tags / statistics / calendar,并 bump `cacheVersion.statistics` / `cacheVersion.calendar`
255+
- 汇率刷新成功后,也会 bump `cacheVersion.statistics` / `cacheVersion.calendar` / `cacheVersion.exchangeRates`
224256

225257
也就是说:
226258

227-
> **30 秒缓存带来的不是“数据一定延迟 30 秒”,而是“最多可能有短时间旧数据”。**
259+
> **缓存带来的不是“写完一定还要等完整 TTL”,而是“正常写后通常会立刻切新版本;只有少数纯时间驱动统计(主要是 `/statistics/overview`)才可能在无写操作时最多短暂旧约 5 分钟”。**
228260
229261
### 2. 不使用 KV
230262

@@ -233,10 +265,13 @@ https://api.resend.com/emails
233265
现在这些能力的处理方式是:
234266

235267
- 读取类接口:使用 isolate 内存短缓存
268+
- 热点聚合接口:额外落一层 D1 `ComputedCache`
236269
- 通知去重:回到 D1
237270
- 导入预览 token:回到 D1
238271
- Logo 搜索缓存:仅保留进程内短缓存
239272

273+
另外,`ComputedCache` 过期行会通过现有的 hourly Worker cron 顺手清理,不单独增加新的调度器。
274+
240275
### 3. Wallos 导入能力
241276

242277
当前 Worker 分支支持:
@@ -315,7 +350,7 @@ Worker Lite 的 Logo 搜索只保留:
315350

316351
---
317352

318-
## 、本地手动部署(开发者可选)
353+
## 、本地手动部署(开发者可选)
319354

320355
如果你不是普通 fork 用户,而是本地维护这个分支的开发者,也可以直接在本机执行:
321356

@@ -336,7 +371,7 @@ npm run deploy:worker:r2
336371

337372
---
338373

339-
## 、本地开发(开发者可选)
374+
## 十一、本地开发(开发者可选)
340375

341376
如果你需要本地调试 Worker:
342377

@@ -354,24 +389,3 @@ http://127.0.0.1:8787
354389
355390
---
356391

357-
## 十一、当前分支能力边界
358-
359-
### 支持
360-
361-
- 登录
362-
- 订阅管理
363-
- 标签
364-
- 统计
365-
- 日历
366-
- 汇率刷新
367-
- Webhook
368-
- PushPlus
369-
- Telegram
370-
- Resend 邮件
371-
- AI 文本 / 图片识别
372-
- Wallos JSON / SQLite / ZIP 导入
373-
374-
### 不支持
375-
376-
- 本地 OCR
377-
- 原生 SMTP

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
1-
# SubTracker Lite
1+
<p align="center">
2+
<img src="./screenshot/brand.png" alt="SubTracker Lite" width="220" />
3+
</p>
24

3-
[![GitHub release](https://img.shields.io/github/v/release/Smile-QWQ/SubTracker?style=flat-square)](https://github.com/Smile-QWQ/SubTracker/releases)
4-
[![GitHub stars](https://img.shields.io/github/stars/Smile-QWQ/SubTracker?style=flat-square)](https://github.com/Smile-QWQ/SubTracker/stargazers)
5-
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)
5+
<p align="center">
6+
<a href="https://github.com/Smile-QWQ/SubTracker/releases"><img src="https://img.shields.io/github/v/release/Smile-QWQ/SubTracker?style=flat-square" alt="GitHub release" /></a>
7+
<a href="https://github.com/Smile-QWQ/SubTracker/stargazers"><img src="https://img.shields.io/github/stars/Smile-QWQ/SubTracker?style=flat-square" alt="GitHub stars" /></a>
8+
<a href="https://www.gnu.org/licenses/gpl-3.0"><img src="https://img.shields.io/badge/License-GPLv3-blue.svg?style=flat-square" alt="License: GPL v3" /></a>
9+
</p>
610

7-
一个现代化的自托管订阅管理工具,用来统一管理多币种订阅、续订提醒、预算分析、Logo 资源,以及 Wallos 数据迁移。
11+
<p align="center">
12+
现代化的自托管订阅管理工具,统一管理多币种订阅、续订提醒、预算分析、Logo 资源,以及 Wallos 数据迁移。
13+
</p>
814

9-
本分支当前只保留 **Cloudflare Worker** 部署路线,详见:
10-
11-
- [`DEPLOYMENT.md`](./DEPLOYMENT.md)
15+
<p align="center">
16+
当前分支仅保留 <strong>Cloudflare Worker</strong> 部署路线 · <a href="./DEPLOYMENT.md">查看部署文档</a>
17+
</p>
1218

1319
## 界面预览
1420

@@ -42,21 +48,14 @@
4248

4349
## Lite 版说明
4450

45-
这个分支面向 **Cloudflare Worker Free**因此会主动做一些性能取舍来换稳定性
51+
这个分支面向 **Cloudflare Worker Free**因此会做一些 Lite 化取舍
4652

47-
- 读取类接口使用 **isolate 内存短 TTL 缓存**
53+
- 热点统计 / 日历接口会使用 D1 缓存来降低 Worker CPU 压力
4854
- **不使用 KV**
49-
- Logo 搜索是 Lite 版,只保留网站候选 + DuckDuckGo
50-
- Cron 已拆成更轻的 Worker 版职责
55+
- Wallos 导入、Logo 搜索、Cron 等能力都做了 Worker 适配
5156
- 遇到 `503` / CPU 超限时,前端会明确提示可能受 Worker 免费版限制影响
5257

53-
这意味着:
54-
55-
- 大部分功能可以还原
56-
- 但短时间内可能看到旧数据
57-
- Logo 搜索质量和实时性不追求与 main 的 Docker 版完全一致
58-
59-
详细说明见:
58+
更详细的部署、能力边界与性能说明见:
6059

6160
- [`DEPLOYMENT.md`](./DEPLOYMENT.md)
6261

@@ -109,7 +108,7 @@ npm test
109108

110109
1. fork 仓库
111110
2. 配置 Cloudflare Secrets / Variables
112-
3. 在 GitHub Actions 中运行 **Deploy to Cloudflare**
111+
3. 在 GitHub Actions 中运行 **Lite CI and Deploy**
113112
4. 后续通过 **Sync fork** 自动更新
114113

115114
常用仓库 Variables:
@@ -119,8 +118,7 @@ npm test
119118

120119
## 工作流
121120

122-
- `CF Worker CI`:负责 lint / test / build
123-
- `Deploy to Cloudflare`:首次 fork 后手动运行一次,后续 sync fork 自动部署
121+
- `Lite CI and Deploy`:同一个 workflow 里先跑 lint / test / build,验证通过后再部署到 Cloudflare
124122

125123
## 许可证
126124

screenshot/brand.png

3.73 KB
Loading

0 commit comments

Comments
 (0)