protected void RemoveNodeFromComponentCache(ISystemContext context, NodeHandle handle)
{
lock (Lock)
{
if (handle == null)
{
return;
}
if (m_componentCache != null)
{
NodeId nodeId = handle.NodeId;
if (!String.IsNullOrEmpty(handle.ComponentPath))
{
nodeId = handle.RootId;
}
CacheEntry entry = null;
if (m_componentCache.TryGetValue(nodeId, out entry))
{
entry.RefCount--;
if (entry.RefCount == 0)
{
m_componentCache.Remove(nodeId);
}
}
}
}
}