-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
GITC-478: Caching github user object. #9804
Conversation
logger = logging.getLogger(__name__) | ||
|
||
|
||
class GitCache(SuperModel): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nutrina can you add tests for this model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ksolo Yes, I am on it
91e9485
to
aa5305e
Compare
@ksolo Have added test cases |
aa5305e
to
fea7217
Compare
fea7217
to
836170a
Compare
Have created model to store the serialized github entities. Have also reworked code, mainly in the `git/utils.py` file to make use of this cache.
836170a
to
ba6a0c3
Compare
@thelostone-mc I have rebased this to stable |
* GITC-478: Caching github user object. Have created model to store the serialized github entities. Have also reworked code, mainly in the `git/utils.py` file to make use of this cache. * GITC-478: remove logs for sensitive data * GITC-478: Adding tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10x09D1564FB8344A4d0F74975bCed78eB7c7912617
Have created model to store the serialized github entities. Have also reworked code, mainly in the
git/utils.py
file to make use of this cache.Description
This fixes the caching and conditional requests for the user object from Github API.
For now this only handles the user obejct requests, but this fix can be extended for repo and issue objects as well.
Refers/Fixes
GITC-478
This should fix the high amount of rate limit errors in sentry.
Testing
This would normally be triggered by going to the profile or dashboard pages for a user.