Skip to content

cache_on_arguments not taking class member variables or class object into consideration #213

@anandtripathi5

Description

@anandtripathi5

So lets say I'm having a below example

Class A:
    def __init__(self, param_1, param_2):
        self.param_1 = param_1
        self.param_2 = param_2
    @region.cache_on_arguments()
    def a(self, param):
        return param*self.param_1*self.param_2

So if I call
A(1,2).a(2)
this will cache the function result for other objects too like

A(3,4).a(2)
A(5,6).a(2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions