Skip to content

Not working on class method? #65

Open
@beyondskyway

Description

@beyondskyway

Not working example:

class A:

    @cache(namespace="app", expire=3600)
    async def test(self, a=True):
        print("test")
        return [], [], []

Working example:

class A:

    @staticmethod
    @cache(namespace="app", expire=3600)
    async def test(a=True):
        print("test")
        return [], [], []

Is any way to cache data on class method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions