Skip to content

Commit 302570c

Browse files
committed
fix testing issue #16 and #17 for javascript error
1 parent ee3a5ee commit 302570c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/OutputCacheModuleAsync/OutputCacheHelper.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,13 +594,15 @@ private async Task InsertResponseAsync(string cachedVaryKey,
594594
}
595595
// Now insert into the cache
596596
string depKey = null;
597+
OutputCacheEntry oce = null;
597598
if (dependencies != null) {
598599
depKey = OutputcacheKeyprefixDependencies + dependencies.GetUniqueID();
600+
oce = Convert(rawResponse, depKey, dependencies.GetFileDependencies());
601+
await provider.SetAsync(rawResponseKey, oce, absExp);
602+
}
603+
else {
604+
await provider.SetAsync(rawResponseKey, rawResponse, absExp);
599605
}
600-
OutputCacheEntry oce = Convert(rawResponse, depKey, dependencies.GetFileDependencies());
601-
602-
await provider.SetAsync(rawResponseKey, oce, absExp);
603-
604606
if (dependencies != null) {
605607

606608
// Check if Cache Dependency is supported

0 commit comments

Comments
 (0)