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

Fix guild cache when requesting guild through UUID or name and add support for PHP 8 #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MaxKorlaar
Copy link
Contributor

The method CacheUtil::isExpired compares timestamps in order to validate if a timestamp is older than allowed, defined by a given cache time. Both the timestamp and cache time should be in milliseconds, but are given in seconds, therefore always yielding true as a result, breaking the caching mechanism. Additionally, support for PHP 8 is added in composer.json.

@MaxKorlaar
Copy link
Contributor Author

By the way @Plancke, don't forget to add the label 'hacktoberfest' to this repository for some Hacktoberfest goodness 😉

@Plancke
Copy link
Owner

Plancke commented Oct 15, 2021

There are a couple more calls to that method in the Mongo handler as well, afaik all timestamps in cached data are seconds so those are probably also non-functioning. Though with how I check the existing guild's collection first before doing this byName/byPlayer lookup it's probably not impacted.

@MaxKorlaar
Copy link
Contributor Author

Fair enough, I don't use that handler myself so I've missed that. I'll look into it later!

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