Skip to content

[REQ] [csharp-netcore] Allow setting CachingPolicy for RestSharp Requests #5352

@hacki11

Description

@hacki11

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

To enable caching within the generated csharp-netcore Rest Client, the CachingPolicy must be set:
restsharp/RestSharp#401

Please open access to be able to pass the CachingPolicy to RestSharps RestClient.

Describe the solution you'd like

A property (CachingPolicy) in IReadableConfiguration which will be used inside request to construct the RestClient object.

Describe alternatives you've considered

Using the old swagger codegen project and manipulate the mustache template manually to use the RestSharp version > 105 (like released 2018) where CachingPolicy can be set. In the old swagger codegen version access to RestClient was public and was not constructed on every request.
Same as WebProxy access: #4466

Additional context

Is there another mechanism to enable Caching?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions