Skip to content

Commit 23f4cb1

Browse files
committed
Explicitly refresh content type cache on Move()
Despite multiple adustments to how `Move()` handles `ResetAttributeDescriptors()`, this functionality still isn't working in live site integration testing, even though it seems to work in both unit tests and local integration tests. That likely suggests a discrepency in the lifestyle configuration of dependencies, which could be introducing a version conflict. This _should_ be mitigated by other measures I've put in place which help ensure that any caching layer (e.g., `CachedTopicRepository`) is using the same object references as the `TopicRepositoryBase.GetContentTypes()`. Since that's not working, I'm going to try _explicitly_ updating the content type cache via `Move()`, just to be safe. This should not be necessary—though it won't really hurt anything, either. (There's a small amount of overhead, but `Move()` operations are rare, and the database cost will far outweigh this extra validation.)
1 parent 9a7ef01 commit 23f4cb1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

OnTopic/Repositories/TopicRepositoryBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,7 @@ public virtual void Move([ValidatedNotNull]Topic topic, [ValidatedNotNull]Topic
446446
| descendants needs to be reset to ensure the inheritance structure is updated.
447447
\-----------------------------------------------------------------------------------------------------------------------*/
448448
if (previousParent != target && topic is ContentTypeDescriptor) {
449+
SetContentTypeDescriptors(topic);
449450
ResetAttributeDescriptors(topic);
450451
}
451452

0 commit comments

Comments
 (0)