Skip to content
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

V4: State and Cache providers #2251

Open
wants to merge 12 commits into
base: 4.0
Choose a base branch
from
Open

V4: State and Cache providers #2251

wants to merge 12 commits into from

Conversation

quinchs
Copy link
Member

@quinchs quinchs commented Apr 18, 2022

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
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
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

Copy link
Collaborator

@lhjt lhjt left a comment

Choose a reason for hiding this comment

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

Just a few copyedits

src/Discord.Net.WebSocket/DiscordSocketConfig.cs Outdated Show resolved Hide resolved
@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

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