Skip to content

It's impossible to implement a custom NodeCache now #636

@BlackBaroness

Description

@BlackBaroness

Since 5.0.0, DecodedValue class became package-private
Because of that, no third-party cache implementation can exist because it must implement the following contract:

public interface NodeCache {
    interface Loader {
        DecodedValue load(CacheKey<?> key) throws IOException;
    }
    DecodedValue get(CacheKey<?> key, Loader loader) throws IOException;
}

The most simple implementation of which is:

builder.setCache((key, loader) -> loader.load())

But even that is not possible, because loader.load() call returns a package-private class we unable to refer to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions