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

Support hardcoded locale for better caching #2836

Open
martin-tarjanyi opened this issue Jan 7, 2025 · 1 comment
Open

Support hardcoded locale for better caching #2836

martin-tarjanyi opened this issue Jan 7, 2025 · 1 comment

Comments

@martin-tarjanyi
Copy link

Is your feature request related to a problem? Please describe.

Currently, the caching mechanism uses the locale as the key. This makes sense in some cases but in lots of cases there is no need to support different locales in the API documentation. If there is no locale-specific logic in the API docs, caching is not very effective.

Describe the solution you'd like

Provide the option to hardcode the locale for the API docs and if it is present, use that for docs generation and caching.

Describe alternatives you've considered

Pre-load all expected locales but it would be error-prone and wasteful.

@martin-tarjanyi
Copy link
Author

martin-tarjanyi commented Jan 7, 2025

Possibly the already existing disableI18n config property could be used for this purpose. If it is true, use the default locale always for resolution and caching.

Although, on second thought, it would be nice to define the locale explicitly instead of relying on the the default system locale in such scenario.

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