Skip to content

Only cache if an object as a parameter is the SAME object (===), not if it has the same content  #9

@ChrisCinelli

Description

@ChrisCinelli

It looks like that you only have a cache hit if an object in the parameters is === across calls.

const a = {a: 1};
const a2 = {a: 1};

const myMemoizedFunc = memoizerific(10000)(myFunc);

myMemoizedFunc(a);
// This is a cache miss
myMemoizedFunc(a2);

See this test: ChrisCinelli@b7083c1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions