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

希望增加优先后台配置模型id和纹理id #33

Closed
stars-one opened this issue Oct 13, 2023 · 3 comments · Fixed by #34
Closed

希望增加优先后台配置模型id和纹理id #33

stars-one opened this issue Oct 13, 2023 · 3 comments · Fixed by #34

Comments

@stars-one
Copy link
Contributor

我修改了模型id和材质的id,但是实际上页面加载js控制台里的url还是固定为1-53

image

接口地址我是换成了https://live2d.fghrsh.net/api/

清除缓存都试过了,没有效果

@stars-one
Copy link
Contributor Author

确认了,是缓存问题导致

@stars-one
Copy link
Contributor Author

stars-one commented Oct 14, 2023

不过话说这个缓存问题的话可以优化一下吗?不能说我后台改了配置,前端得清个缓存才会生效吧?觉得体验有点不好,不应该是优先后台配置嘛?

现在存储到前端的,我知道就是为了保存前端其他用户访问的时候点了换装,然后下次进来还是同样的模型

考虑可以在配置加个开关,如果开启,就是强制使用后台配置的模型id和材质,忽略前台用户的设置

@stars-one stars-one reopened this Oct 14, 2023
@stars-one stars-one changed the title 发现个bug,修改模型id和纹理id无效 希望增加优先后台配置模型id和纹理id Oct 14, 2023
@LIlGG
Copy link
Owner

LIlGG commented Oct 16, 2023

我的解决方案是更倾向于缓存中保存上一次的配置信息,如果发现配置信息发生了变动,则清理缓存,如果配置信息不变,则继续保持原有的逻辑。

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

Successfully merging a pull request may close this issue.

2 participants