Skip to content

Fixes #4299 - Isolate Client Resource Cache by Server #4311

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

MohabCodeX
Copy link
Contributor

For: #4299

the implementation includes automatic migration for legacy cached resources, allowing a smooth transition without user interaction or data loss.
While legacy support is currently maintained for backward compatibility, it may be deprecated in the future to simplify the system further. Removing legacy support would reduce maintenance overhead .. but if we didn't implement it for now .. it would require clients to re-download resources when connecting to servers for the first time after the change.

@MohabCodeX MohabCodeX changed the title For #4299 - Isolate Client Resource Cache by Server Fixes #4299 - Isolate Client Resource Cache by Server Jul 26, 2025
@tzwer
Copy link
Contributor

tzwer commented Aug 8, 2025

I like the idea.
I have a question, what will happen to the resources shared between the servers? such as hedit and xhedit. The drift servers use the same resource to let the players have their handlings across all the servers.

@MohabCodeX
Copy link
Contributor Author

what will happen to the resources shared between the servers?

With the current automatic migration, shared resources will be copied into each server's folder the first time the client connects.
for example :

resources/
│
├── hedit/
│
├── D432TE/          # server ID
│   └── hedit/       # copied from main resources
│
└── DFG523/          # another server ID
    └── hedit/       # another copy

but if he don't have the resource, for sure it will be downloaded

@tzwer
Copy link
Contributor

tzwer commented Aug 9, 2025

what will happen to the resources shared between the servers?

With the current automatic migration, shared resources will be copied into each server's folder the first time the client connects. for example :

resources/
│
├── hedit/
│
├── D432TE/          # server ID
│   └── hedit/       # copied from main resources
│
└── DFG523/          # another server ID
    └── hedit/       # another copy

but if he don't have the resource, for sure it will be downloaded

Will it only be copied after joining for the first time after this update?
What will happen if the player saves new handlings? will it appear if they play in another server?

@MohabCodeX
Copy link
Contributor Author

Will it only be copied after joining for the first time after this update?
What will happen if the player saves new handlings? will it appear if they play in another server?

Yes it , it will only be copied once when you join a server for the first time after the update, as the migration only runs if the server's specific path doesn’t already have the file. After that, the resource in each server’s folder is independent, so if a player saves new handlings in one server, those changes will not appear in another server

For real example , hud resource for many RP servers , it changes it's data each time you join new RP (OWLg) server , and all servers are saving their imgs and files in the same hud folder , without differentiating between the files of each server.

So, no the player’s handlings will not be shared across servers since each server has it's own directory. But the player could still do it manually by copying the data, or the server could use a database instead of relying on file based settings.

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