Skip to content

expire_leaderboard_at effects on global_member_data #59

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

Open
c0d3c0mpil3 opened this issue May 13, 2018 · 4 comments
Open

expire_leaderboard_at effects on global_member_data #59

c0d3c0mpil3 opened this issue May 13, 2018 · 4 comments

Comments

@c0d3c0mpil3
Copy link

Hi,
We have decided to use your awesome package to replace our postgres one. During the testing period, we have encountered an issue regarding time-based leaderboards. When I use expire_leaderboard_at on our leaderboard which uses global member data, it sets the same expiration date on the global member data too, which is not what we desire since other keys use this data too.
As I tracked the code, this method "_member_data_key" returns the member data key for "expire_leaderboard_at" which causes the global member data to be deleted.
Is there a workaround to prevent this behavior or is it in your plan to develop this feature?

@czarneckid
Copy link
Member

There's currently no option for persistent member data. As a workaround, you could store member data in a separate Redis hash not managed by the leaderboard library.

@c0d3c0mpil3
Copy link
Author

Sure, that came to my mine too but I thought implementing another method to get the user data key while setting expiration in global user data mode would be nice.
Thanks

@czarneckid
Copy link
Member

It's not the member data key function I would change in this case, but maybe a feature around persisting member data to not expire the member data leaderboard.

@c0d3c0mpil3
Copy link
Author

That would be great, thanks.

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

No branches or pull requests

2 participants