Visitar URL original
Cache rework by Plerx2493 · Pull Request #1647 · DSharpPlus/DSharpPlus · GitHub
Skip to content

Cache rework - #1647

Closed
Plerx2493 wants to merge 49 commits into
masterfrom
fix/cacheRework
Closed

Plerx2493 wants to merge 49 commits into
masterfrom
fix/cacheRework

Conversation

@Plerx2493

@Plerx2493 Plerx2493 commented Oct 10, 2023 •

Copy link
Copy Markdown
Member

Summary

Add the concept of a centralized cache and provide the possibilty for users to implement their own caching provider. I also have, due to the nature of dispatch event based caching, overhauled DiscordClient.Dispatch to fix some bugs and make it more readable

Tasks

  • DiscordClient.Dispatch - @Plerx2493
  • DiscordApiClient
  • AuditLogParser - @Plerx2493
  • SlashCommands
  • CNext
  • Add refs to contained entities

Testing

Note

This PR brings massive breaking changes to both entity representations and eventArgs so they reflect more accurately what entities are cached and also to provide IDs for all fields which are cached entities. The user then can request those entities if necessary

@inftord inftord left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

overall LGTM, just a one nitpick regarding docs

Comment thread DSharpPlus/Cache/IDiscordCache.cs Resolved

@VelvetToroyashi VelvetToroyashi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks OK at a cursory glance, waiting for Livia for additional input.

Comment thread DSharpPlus/Cache/CacheConfiguration.cs Resolved
Comment thread DSharpPlus/Cache/DiscordMemoryCache.cs Resolved

@akiraveliara akiraveliara left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

preliminarily looks good, but we'll have to see how it turns out in the end. left a question.

Comment thread DSharpPlus/Cache/CacheKeys.cs Resolved
Comment thread DSharpPlus/Cache/DiscordMemoryCache.cs Resolved
@Plerx2493 Plerx2493 mentioned this pull request Oct 18, 2023
19 of 31 tasks
Comment thread DSharpPlus.Rest/DiscordRestClient.cs Resolved
# Conflicts:
#	DSharpPlus/Entities/AuditLogs/AuditLogParser.cs
#	DSharpPlus/Entities/AuditLogs/DiscordAuditLogEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogAutoModerationExecutedEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogAutoModerationRuleEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogBanEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogBotAddEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogChannelEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogEmojiEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogGuildEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogGuildScheduledEventEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogKickEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMemberMoveEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMemberUpdateEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMessageEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMessagePinEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogOverwriteEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogRoleUpdateEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogStickerEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogThreadEventEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogWebhookEntry.cs
#	DSharpPlus/Entities/AuditLogs/PropertyChange.cs
#	DSharpPlus/Entities/Guild/DiscordGuild.cs
#	DSharpPlus/Entities/Guild/ScheduledEvents/DiscordScheduledGuildEvent.cs
#	DSharpPlus/Net/Rest/DiscordApiClient.cs
# Conflicts:
#	DSharpPlus/Clients/BaseDiscordClient.cs
#	DSharpPlus/Clients/DiscordClient.cs
#	DSharpPlus/Entities/AuditLogs/AuditLogActionCategory.cs
#	DSharpPlus/Entities/AuditLogs/AuditLogActionType.cs
#	DSharpPlus/Entities/AuditLogs/DiscordAuditLogEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogApplicationCommandPermissionEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogAutoModerationExecutedEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogAutoModerationRuleEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogBanEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogBotAddEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogChannelEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogEmojiEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogGuildEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogGuildScheduledEventEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogIntegrationEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogInviteEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogKickEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMemberDisconnectEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMemberMoveEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMemberUpdateEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMessageEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogMessagePinEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogOverwriteEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogPruneEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogStickerEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogThreadEventEntry.cs
#	DSharpPlus/Entities/AuditLogs/Entries/DiscordAuditLogWebhookEntry.cs
#	DSharpPlus/Entities/AuditLogs/PropertyChange.cs
#	DSharpPlus/Entities/Channel/DiscordChannel.cs
#	DSharpPlus/Entities/Channel/Message/DiscordMessage.cs
#	DSharpPlus/Entities/Channel/Message/DiscordMessageReference.cs
#	DSharpPlus/Entities/Channel/Message/DiscordMessageSticker.cs
#	DSharpPlus/Entities/Voice/DiscordVoiceState.cs
#	DSharpPlus/IMessageCacheProvider.cs
#	DSharpPlus/Net/Rest/DiscordApiClient.cs
#	tools/AutoUpdateChannelDescription/Program.cs
@OoLunar OoLunar mentioned this pull request Feb 8, 2024
@Plerx2493 Plerx2493 closed this May 1, 2024
@Plerx2493
Plerx2493 deleted the fix/cacheRework branch May 1, 2024 06:15
@Plerx2493

Copy link
Copy Markdown
Member Author

Closing in favor of the gateway rewrite. branch was moved to plerx/backlog/cache-rewrite

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants