Browse Source

Invalidate caches when a cached object is imported.

tags/docs-0.9
RogueException 9 years ago
parent
commit
5f1f202b79
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/Discord.Net/Helpers/AsyncCollection.cs

+ 6
- 1
src/Discord.Net/Helpers/AsyncCollection.cs View File

@@ -99,7 +99,12 @@ namespace Discord
lock (_writerLock)
{
foreach (var pair in items)
_dictionary.TryAdd(pair.Key, pair.Value);
{
var value = pair.Value;
_dictionary.TryAdd(pair.Key, value);
value.Cache();
RaiseItemCreated(value);
}
}
}



Loading…
Cancel
Save