Skip to content

Commit

Permalink
Fixed an error related to data caching
Browse files Browse the repository at this point in the history
  • Loading branch information
kubagdynia committed Nov 29, 2023
1 parent ff9aeae commit 5fc4c8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CacheDrive/Services/ICacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public interface ICacheService

void Set<T>(T item, int expirySeconds = 0) where T : ICacheable;

Task SetAsync<T>(string key, T value);
Task SetAsync<T>(string key, T value, int expirySeconds = 0);

Task SetAsync<T>(T item, int expirySeconds = 0) where T : ICacheable;

Expand Down
4 changes: 2 additions & 2 deletions CacheDrive/Services/MemoryCacheService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ public void Set<T>(T item, int expirySeconds = 0) where T : ICacheable
Set(cachedItem);
}

public Task SetAsync<T>(string key, T value)
public Task SetAsync<T>(string key, T value, int expirySeconds = 0)
{
return SetAsync(ObjectItem<T>.Create(key, value));
return SetAsync(ObjectItem<T>.Create(key, value), expirySeconds);
}

public Task SetAsync<T>(T item, int expirySeconds = 0) where T : ICacheable
Expand Down

0 comments on commit 5fc4c8d

Please sign in to comment.