Hi Jared,
If you check DancingGoatMVC example website output cache dependencies are only on type (Page Types or Custom Classes):
public void AddDependencyOnPages<T>() where T : TreeNode, new()
{
if (!mCacheEnabled)
{
return;
}
var className = mContentItemMetadataProvider.GetClassNameFromPageRuntimeType<T>();
var dependencyCacheKey = String.Format("nodes|{0}|{1}|all", SiteContext.CurrentSiteName.ToLowerInvariant(), className);
AddCacheItemDependency(dependencyCacheKey);
AddCacheItemDependency("cms.adhocrelationship|all");
AddCacheItemDependency("cms.relationship|all");
}
I think it might not be working with individual objects with this format
string dependencyCacheKey = $"nodeid|{SiteContext.CurrentSiteName}|{home.NodeId}".ToLowerInvariant();
I see in your code a couple of commented examples with "nodes|..|all" dummy key. Are they working for you?