Skip to content

Commit 81f8f4e

Browse files
committed
fix(audit): change stored procedure cache to static to ensure correct persistence
1 parent c3b6f2f commit 81f8f4e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# 6.0.4
2+
- AuditLogging: Stored procedure cache was not being correctly persisted to avoid redundant `SELECT OBJECT_DEFINITION` queries.
23

34
# 6.0.3
45
- `c-select` now correctly respects the `filter` prop for enum collections.

src/IntelliTect.Coalesce.AuditLogging/Internal/AuditInterceptor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ @MergeWindowSeconds INT
312312
/// Cache for stored procedure names. Size is limited in case there is an application whose Model
313313
/// is not a singleton, e.g. dynamic model configuration for schema-based tenancy.
314314
/// </summary>
315-
private readonly MemoryCache _storedProcedureCache = new MemoryCache(new MemoryCacheOptions() { SizeLimit = 4_000 });
315+
private static readonly MemoryCache _storedProcedureCache = new MemoryCache(new MemoryCacheOptions() { SizeLimit = 4_000 });
316316

317317
/// <summary>
318318
/// Ensures the stored procedure exists and returns its name.

0 commit comments

Comments
 (0)