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

Cached methods don't account for language switching #64

Open
Sibert-Aerts opened this issue Jul 19, 2023 · 0 comments
Open

Cached methods don't account for language switching #64

Sibert-Aerts opened this issue Jul 19, 2023 · 0 comments

Comments

@Sibert-Aerts
Copy link

(To preface this, I found this fork after using the original wikipedia library for far too long and getting fed up with its shortcomings, and I'm very happy to have found a kept-up fork that seems to address all the problems I was having!)

As the title says, calling e.g. .search with the same query after switching languages still returns the old language's search results.

I believe in the old library switching languages would just wipe all caches (what exactly was being cached I don't recall...)

For my se case I tend to switch languages often enough that this bug could cause problems. An optimal solution for my use would be accounting for the language as part of the cache key, but from how I see the memoization is set up that wouldn't be a trivial fix.

The issue can be circumvented from my end by just creating a different MediaWikiAPI instance per language, so it's not actually preventing me from using the library.

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

1 participant