Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 删除Bangumi类中get_episodes的cache #852

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

NFTY19
Copy link

@NFTY19 NFTY19 commented Nov 19, 2024

由于之前cache的内容为first_epid的meta内容,会导致bangumi_meta的内容会错误的缓存到所有的ep["id"]中。

Bangumi.get_episodes

  • fix:由于之前cache的内容为first_epid的meta内容,会导致bangumi_meta的内容会错误的缓存到所有的ep["id"]中,故删除了缓存meta内容。

@Nemo2011
Copy link
Owner

确实当时考虑不周到,此处明显不用重复缓存,但是修改的时候也不应该全部不缓存了。函数主体是快速生成所有 Episode 对象,任何一个对象如果 init 的时候没有 cache 就会自动发起网络请求获取相关信息,拖慢运行速度。所以是要改变缓存的方式、避免重复缓存,而不是放弃缓存。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants