Documentation is still unclear
slainless opened this issue ยท 5 comments
While i successfully set up the server using uniskin api model and client can request the texture. There are some problem i came across which is not explained in docs or wiki or repo:
- what is the condition for cache to be invalid? last_updated parameter from uniskin server api response seems to be ignored by the mod
- anyway for server to force the mod to delete cache?
- how to disable cache entirely?
- condition for elytra to be loaded/requested using api other than legacy
i think i have to skim the source to understand how it works. for now...
Also, I have set up the skin server. Where's the config for the client to point to the server?
Also, I have set up the skin server. Where's the config for the client to point to the server?
I did it this way ๐
https://pastebin.com/Dda7SdYL
@PanoptesDreams UniSkinAPI has English document, you can use this API.
https://github.com/RecursiveG/UniSkinServer/blob/master/doc/UniSkinAPI_en.md
Then add this in CustomSkinLoader's config loadlist
:
{
"name":"example",
"type":"uniskinapi",
"root":"https://www.example.com/"
}
-
We judge the cache like your browser. If
Expires
orCache-Control
specified, we will follow it. If we find the cache expires, we will make a request. Otherwise, we will use local cache.
Code about expire judge: https://github.com/xfl03/MCCustomSkinLoader/blob/csl-14/Common/source/customskinloader/utils/HttpRequestUtil.java#L237-L249 -
You can set short
Expires
orCache-Control
BEFORE PROFILE LOADED, we will try to request profile online everytime.
Code about cache check: https://github.com/xfl03/MCCustomSkinLoader/blob/csl-14/Common/source/customskinloader/utils/HttpRequestUtil.java#L95-L115 -
In UniSkinAPI document, we can see a model named
elytron
, it means elytra.
Commit: a6666b5
Thanks for your question.
@xfl03 while i have found the answer, i appreciate the clear reply nonetheless. I think this will answer question about cache in the future.