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

Caching improvement #285

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Caching improvement #285

wants to merge 4 commits into from

Conversation

kleeedolinux
Copy link

Summary

This pull request introduces significant improvements to the caching system in Discordrb, enhancing performance and reliability when interacting with Discord's API. The changes implement TTL-based caching and rate-limiting mechanisms to prevent API throttling while optimizing memory usage.

These improvements will help applications maintain better performance while staying within Discord's API limits.

Added

  • TTL-based caching system for API requests
  • Rate-limiting mechanism for API calls
  • Thread-safe caching operations
  • Memory optimization features

Changed

  • Modified API request handling to use new caching system
  • Updated cache storage implementation
  • Improved request queueing system
  • Enhanced error handling for cached requests
  • Optimized memory usage patterns

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • Memory leak issues in cache storage
  • Rate-limiting violations
  • Thread safety issues in concurrent operations
  • Cache staleness problems
  • Performance bottlenecks in API requests

Copy link
Member

@swarley swarley left a comment

Choose a reason for hiding this comment

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

Hey! I don't think I'm going to be merging this because the caching of these values for an arbitrary amount of time is unexpected at this layer and it's confusing to me that some of the interaction based things are being cached at all. If you've got a problem that this solves I would be happy to discuss it with you though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants