Open HopeBaron opened 1 year ago
could you provide some examples how you think this all should be used (maybe also compared to the old cache api)? that way it will be easier to review because i would know what i'm looking at and what the intention was.
@Lukellmann https://gist.github.com/HopeBaron/8417dbbbfa814be381b8c8498f4ba534 Above is a full example output:
{SnowflakeSetIndex(snowflakes=[1, 123])=MemberData(guildId=1, userId=123)}
{SnowflakeSetIndex(snowflakes=[123])=UserData(userId=123)}
{}
{}
what i just realized is a problem with Cache.filter
and Cache.firstOrNull
: these will always have O(n) complexity because all objects have to be accessed to be filtered.
Yeah but the implementation doesn't specify a Key no more if you are looking for something you can identify you can easily add that sort of data to your key. Create a key out of it, and get it.
This PR is to: