Skip to content

Commit 8f24064

Browse files
committed
update the test custom provider's add method to match the legacy behavior
1 parent c3428f0 commit 8f24064

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/CustomOutputCacheProvider/CustomOutputCacheProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public override async Task<object> AddAsync(string key, object entry, DateTime u
6464
_dict.Add(key, new CustomOutputCacheItem(entry, utcExpiry));
6565
}
6666
else {
67-
_dict[key] = new CustomOutputCacheItem(entry, utcExpiry);
67+
entry = _dict[key].Obj;
6868
}
6969
return entry;
7070
}
@@ -127,7 +127,7 @@ public override object Add(string key, object entry, DateTime utcExpiry) {
127127
_dict.Add(key, new CustomOutputCacheItem(entry, utcExpiry));
128128
}
129129
else {
130-
_dict[key] = new CustomOutputCacheItem(entry, utcExpiry);
130+
entry = _dict[key].Obj;
131131
}
132132
return entry;
133133
}

0 commit comments

Comments
 (0)