Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
MohabCodeX wants to merge 18 commits into multitheftauto:master
base: master
Choose a base branch
Loading
from MohabCodeX:ResourceCache

Conversation

@MohabCodeX
Copy link
Contributor

@MohabCodeX MohabCodeX commented Jul 26, 2025

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.

xAzke, Wannacry-ops, YSAFE, tzwer, omar-o22, and Kinimel reacted with rocket emoji
@MohabCodeX MohabCodeX changed the title (削除) For #4299 - Isolate Client Resource Cache by Server (削除ここまで) (追記) Fixes #4299 - Isolate Client Resource Cache by Server (追記ここまで) Jul 26, 2025
MohabCodeX added 14 commits July 30, 2025 21:15
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.

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

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?

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.

Copy link

blonter commented Aug 9, 2025

Just asking: What happens with the default resources, especially if every server uses them? There will be countless of copies of the admin resource for example? What about race maps?

Copy link
Contributor Author

Yes, in this approach there will be separate copies of default resources (like admin or race maps) for each server.
I don’t really see this as a problem even if you have the same resource across servers, it’s very common for them to have small differences, like a single line of code or configuration change. That still means the script is different.

Copy link
Contributor

tzwer commented Aug 13, 2025

What would happen to the servers that have multiple servers? such as Drift Paradise and Dayz?

Copy link
Contributor Author

As I said, for now, to support backward compatibility, downloaded scripts will be copied to the server directory that uses them. But in the future, each server will have its own directory, which means scripts will be re-downloaded.
By the way, the suggestion you mentioned is good 👍🏻 I’d like to hear more opinions on the usability and possible methods to configure scripts so we can come up with better solutions.

tzwer reacted with thumbs up emoji

Copy link
Contributor

samr46 commented Aug 18, 2025

which means scripts will be re-downloaded

We have 21 servers with the exact same gamemode (cache size is ~800 MB). 60% of permanent player base play on at least 4 servers on average. Some players play on 10+ servers. And most of players connect to different servers on a daily basis (due server specific events).

So you want to tell me that our players will have to re-download cache files? Is this a joke? And I'm not even talking about wasted disk space on player PCs.

This feature isn't feasible unless you add a way to use the same cache folder for multiple servers.
It can be done in a similar way private per-server cache files work (the key is saved in server-id.keys on the server and transferred to the client on connection).

MohabCodeX, Fernando-A-Rocha, and Wannacry-ops reacted with thumbs up emoji

@MohabCodeX MohabCodeX marked this pull request as draft August 22, 2025 23:15
Copy link
Contributor

By default this is a good thing, however there are also servers like the ones samr46 mentioned. That’s why there could be an extra option for servers that overrides this. So if I disable it, the files will be downloaded to one location.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /