Skip to content

V4: State and Cache providers#2251

Open
quinchs wants to merge 12 commits into
4.0from
v4/state-cache-providers
Open

V4: State and Cache providers#2251
quinchs wants to merge 12 commits into
4.0from
v4/state-cache-providers

Conversation

@quinchs

@quinchs quinchs commented Apr 18, 2022

Copy link
Copy Markdown
Member

Summary

This PR implements state and cache providers as proposed in #2238.

The current api of the providers is up for debate, I've implemented it how I see fit but feedback and reviews are always welcome.

Todo:

  • API design
  • Internal reference cache
  • Default providers
    • Default concurrent providers
    • Redis cache provider
  • Entities
    • Users
    • Presence
    • Channels
    • Guilds
    • Messages
    • Emotes

@quinchs quinchs self-assigned this Apr 18, 2022
@quinchs quinchs added this to the 4.0 milestone Apr 18, 2022
@quinchs quinchs linked an issue Apr 18, 2022 that may be closed by this pull request

namespace Discord
{
internal static class CacheableEntityExtensions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason why these methods arent returning the generic type parameters? We could downcast it later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, its just whats there atm. it could change once I implement the rest of the entities

@lhjt lhjt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few copyedits

Comment thread src/Discord.Net.WebSocket/DiscordSocketConfig.cs Outdated
Comment thread src/Discord.Net.WebSocket/Entities/Users/SocketGuildUser.cs Outdated
quinchs and others added 2 commits April 24, 2022 10:06
Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
Co-authored-by: Jared L <48422312+lhjt@users.noreply.github.com>
@quinchs
quinchs requested a review from lhjt April 24, 2022 13:17
@quinchs
quinchs changed the base branch from dev to 4.0 May 31, 2022 14:24
@AddressXception

Copy link
Copy Markdown

Is this still on the roadmap? I'm building something and using this library but running into a few limitations that I need to work around. I left my comments in this discussion here:

#2508

thanks!

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

Projects

Status: Working on

Development

Successfully merging this pull request may close these issues.

Proposal: State and Cache providers

5 participants