Skip to content

Add caching support for get_prompt #324

Description

@theertha-devan

Is your feature request related to a problem? Please describe.
Currently, every invocation of get_prompt() in the Netra SDK results in a backend API call, even when the same prompt has already been fetched during the application's lifetime. This leads to unnecessary network requests, increased latency, and additional backend load, especially for applications that repeatedly retrieve the same prompts.

Describe the solution you'd like
Implement an in-memory caching mechanism for get_prompt() so repeated requests return the cached prompt instead of making another API call.

Describe alternatives you've considered
Implementing caching at the application level, but this requires every SDK consumer to build and maintain their own caching logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions