Skip to content

[question] Cache results respecting raw request path? #64

Open
@V3ntus

Description

@V3ntus

I have a function that utilizes the raw starlette request to parse the path_parameters in order to provide dynamic content. Right now, the cache implementation returns the same cached result regardless of the path. Would there be any way to intercept the args/kwargs in the decorator to provide a more in-depth cache system?

My code looks something like:

@cache()
async def get(request: Request):
    # return content based on request[some_key]

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions