Skip to content

unexpected behavior in cached function when key words arguments are used. #14

Description

@asdf8601

Hello,

I have found this project very useful and while I was doing tests I have found this behavior unexpected for me.

I leave below a minimum reproducible example:

import pandas as pd
import cachey

df = pd.DataFrame([[1, 2]], columns=list("ab"))
c = cachey.Cache(1e9)


@c.memoize
def boo(df):
    print("not cached!")
    return df, df.to_dict()


boo(df=df)  # not works
boo(df)    # works
boo(df)    # works 

I don't know if this comment is appropriate but I thought it was interesting, maybe you can give me a clue as to what could cause this problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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