Skip to content

Commit

Permalink
fix: Concurrent error caused by GFunctionCache.
Browse files Browse the repository at this point in the history
  • Loading branch information
AsakusaRinne committed Sep 24, 2022
1 parent bec496a commit 25e0b68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Casbin/Caching/GFunctionCache.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections.Generic;
using System.Collections.Concurrent;


namespace Casbin.Caching;

public class GFunctionCache : IGFunctionCache
{
private readonly Dictionary<string, bool> _cache = new();
private readonly ConcurrentDictionary<string, bool> _cache = new();

public void Set(string name1, string name2, bool result, string domain = null)
{
Expand Down

0 comments on commit 25e0b68

Please sign in to comment.