Skip to content

Allow client sided resource cache to be isolated per server #4299

Open
@Nico8340

Description

@Nico8340

Is your feature request related to a problem? Please describe.

Currently, when a player joins a server, all client sided resources are cached in the shared resources/ directory based on the resource name. This leads to several problems:

  • If multiple servers use resources with the same name but different contents or versions, the client must redownload them every time they switch servers.

  • Developers are forced to prefix names (e.g., server1_inventory, server2_inventory) to avoid conflicts.

Describe the solution you'd like

Introduce a way for the client to cache resources in a server specific subdirectory, using a unique identifier. This would isolate resource storage per server and eliminate name conflicts or redundant downloads.

There is already a working internal identification system via the server-ids.xml file, which assigns a unique identifier to each server. I propose leveraging this existing solution to define per server cache directories.

For example, instead of saving resources under:

resources/inventory/

They could be stored as:

resources/<id>/inventory/

This follows the same structure already used by the priv/ directory, which isolates data per server.

Describe alternatives you've considered

Resource name prefixing, which is widely used but leads to inconsistent resource names, bloated exports.

Additional context

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions