Skip to content

Commit

Permalink
stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
ffMathy committed Jan 13, 2019
1 parent d68dc84 commit c97b49b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public DistributedCachePersistenceStrategy(
TimeSpan expiry) : base(
async (key, bytes) =>
{
logger.LogInformation("Persisting " + key + " to distributed cache.");
logger.LogInformation("Persisting {0} to distributed cache.", key);
await cache.SetAsync(KeyPrefix + key, bytes, new DistributedCacheEntryOptions()
{
AbsoluteExpirationRelativeToNow = expiry
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIMXir4k04WxO00Po/4R40uJ3vVCkgdtpUk3GPHw/ds4joAoGCCqGSM49
AwEHoUQDQgAEB94BK3LM5HrX1anh2IM3ZqloO0nG9a6L0x3fiaRyUoF+GaaHJ2Wt
t4hqwhgTVIOpSkMR78zQv0lCnvzKVbp78A==
-----END EC PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIMXir4k04WxO00Po/4R40uJ3vVCkgdtpUk3GPHw/ds4joAoGCCqGSM49
AwEHoUQDQgAEB94BK3LM5HrX1anh2IM3ZqloO0nG9a6L0x3fiaRyUoF+GaaHJ2Wt
t4hqwhgTVIOpSkMR78zQv0lCnvzKVbp78A==
-----END EC PRIVATE KEY-----
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ public async Task PersistChallengesAsync(ChallengeDto[] challenges)
}

private async Task PersistAsync(PersistenceType persistenceType, byte[] bytes, IEnumerable<IPersistenceStrategy> strategies) {
_logger.LogTrace("Persisting {0} through strategies.", persistenceType);

var tasks = strategies.Select(x => x.PersistAsync(persistenceType, bytes ?? new byte[0]));
await Task.WhenAll(tasks);
}
Expand Down

0 comments on commit c97b49b

Please sign in to comment.