We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have the feeling that the subject cache is not being used as every time I load a subject it queries the API.
Iterate over a list of radical IDs and store them in a subjects dict.
I assume this: subject = client.subject(id) Uses the cache if available, but it is super slow and seems to query WK.
client = Client(v2_api_key, subject_cache_enabled=True) radicals = client.subjects(levels=1, types='radical') for radical in radicals: rad_list.append(radical.id) subjects = {} def generate_items(): for id in rad_list: subject = client.subject(id) if not subject.characters == None: subjects[str(id)] = [subject.characters] return subjects
The text was updated successfully, but these errors were encountered:
Heya! Honestly, it's been a long time since I wrote this! Let me dig into the code and get back to you :)
Sorry, something went wrong.
No branches or pull requests
Description
I have the feeling that the subject cache is not being used as every time I load a subject it queries the API.
What I Did
Iterate over a list of radical IDs and store them in a subjects dict.
I assume this: subject = client.subject(id)
Uses the cache if available, but it is super slow and seems to query WK.
The text was updated successfully, but these errors were encountered: