Skip to content

Add support for caching based on Locale. #1354

Closed
@ianwallen

Description

@ianwallen

Describe the feature
Caching does not seem to take locale into account.

public OpenAPI getCachedOpenAPI() {
return cachedOpenAPI;
}

This can causes the wrong language to be displayed.

To Reproduce
Turn on caching (springdoc.cache.disabled=false)
Generate first request to swagger page using English locale
Generate second request swagger page using French locale

Expected behavior
I would expect that the second request using the French locale would return the French content however it returns the cached data which is the English content.

Note: Doing the reverse produces the opposite results. i.e. French local first and then English locale second will end up producing French data for the English locale.

Additional context
Work around seems to be to set
springdoc.cache.disabled=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions