You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrated GetContentTypes(ContentTypeDescriptor) to new Refresh() method
Migrated the `TopicRepositoryBase.GetContentTypes(ContentTypeDescriptor)` overload to utilize the newly introduced `ContentTypeDescriptorCollection.Refresh()` method (3e3930f).
Since the `GetContentTypes()` overload was already migrated, this allows the removal of unintuitive state tracking via the `_contentTypeDescriptors` field initialization in order to avoid a circular loop (since each function previously called into the other). and since `Refresh()` now has the core functionality which this overload was previously dependent on, that can now be removed. Indeed, this greatly simplifies the logic for this overload.
As part of this, the logic also changes so that the source topic graph is always utilized, assuming it can be identified. This is actually faster than trying to merge the two collections via the `Refresh()` method. But, more importantly, it also avoids some complications caused by versioning conflicts between different in-memory representations of `ContentTypeDescriptor`s (e.g., one in `CachedTopicRepository`, another in `SqlTopicRepository`). By replacing the entire collection, we avoid these types of problems, and help ensure that the cache is always using the same topic graph that the application is operating off of.
0 commit comments