def METHOD_NAME():
    class Model(param.Parameterized):
        data = param.Parameter(default=1)
        executions = param.Integer(default=0)
        @cache
        def expensive_calculation(self, value):
            self.executions += 1
            return 2*value
    model = Model()
    assert model.expensive_calculation(1) == 2
    assert model.expensive_calculation(1) == 2
    assert model.executions == 1
    assert model.expensive_calculation(2) == 4
    assert model.executions == 2