Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## HttpClient.Cache - Samples

Simple console app with in-memory example for cache.

`ConsoleApp` works only with caching data from external source.
4 changes: 2 additions & 2 deletions src/HttpClient.Cache/InMemory/CacheEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ internal CacheEntry(
}

public object Key { get; }
public object Value { get; set; }
public object Value { get; set; } = null!;

public CacheEntryPriority Priority { get; set; } = CacheEntryPriority.Normal;

Expand Down Expand Up @@ -222,7 +222,7 @@ internal void InvokeEvictionCallbacks()
return;
}

Task.Factory.StartNew(state => InvokeCallbacks((CacheEntry)state), this, CancellationToken.None,
Task.Factory.StartNew(state => InvokeCallbacks((CacheEntry)state!), this, CancellationToken.None,
TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}

Expand Down
2 changes: 1 addition & 1 deletion src/HttpClient.Cache/InMemory/MemoryCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ private void StartScanForExpiredItems()

_lastExpirationScan = currentTime;

Task.Factory.StartNew(state => ScanForExpiredItems((MemoryCache)state), this, CancellationToken.None,
Task.Factory.StartNew(state => ScanForExpiredItems((MemoryCache)state!), this, CancellationToken.None,
TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
}

Expand Down
5 changes: 5 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## HttpClient.Cache - Code

The Source code. This folder and project will be packaged


7 changes: 7 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## HttpClient.Cache - Tests

Unit tests for cache package.

Test framework - Xunit.