Skip to content

Commit 8b9c3e2

Browse files
committed
feat: 延长RSS源下载缓存时间至7天
- 将RSS源下载的缓存过期时间从24小时延长到7天(3600*24*7) - 更新项目版本号从1.1.38到1.1.39 此修改旨在减少对同一RSS源的重复请求,提高数据获取效率并降低服务器负载。 较长的缓存时间适用于更新频率较低的RSS源,同时保持缓存机制的有效性。
1 parent 65fdf00 commit 8b9c3e2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "funread"
3-
version = "1.1.38"
3+
version = "1.1.39"
44
description = "一个用于管理和处理阅读源(Legado 阅读 APP 的书源和 RSS 源)的 Python 工具库"
55
readme = "README.md"
66
requires-python = ">=3.8"

src/funread/legado/manage/download/rss.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def loader(self):
9999
cache_path = f"{self.path_rot}/../cache"
100100
logger.info(f"cache_path:{cache_path}")
101101

102-
@disk_cache(cache_key="url", cache_dir=cache_path, expire=3600 * 24)
102+
@disk_cache(cache_key="url", cache_dir=cache_path, expire=3600 * 24 * 7)
103103
def load_data(url: str) -> dict:
104104
try:
105105
return requests.get(url, headers=faker.generate()).json()

0 commit comments

Comments
 (0)