Skip to content

Commit d081f06

Browse files
feat: get rid of type cache entirely
1 parent 37d48de commit d081f06

File tree

2 files changed

+1
-57
lines changed

2 files changed

+1
-57
lines changed

YDotNet/Document/Doc.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public class Doc : UnmanagedResource
3939
private readonly EventSubscriber<UpdateEvent> onUpdateV1;
4040
private readonly EventSubscriber<UpdateEvent> onUpdateV2;
4141
private readonly Doc? parent;
42-
private readonly TypeCache typeCache = new();
4342
private int openTransactions;
4443

4544
/// <summary>
@@ -542,7 +541,7 @@ private T GetOrAdd<T>(nint handle, Func<nint, Doc, T> factory)
542541
{
543542
var doc = GetRootDoc();
544543

545-
return doc.typeCache.GetOrAdd(handle, h => factory(h, doc));
544+
return factory(handle, doc);
546545
}
547546

548547
private void ThrowIfOpenTransaction()

YDotNet/Infrastructure/TypeCache.cs

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)