You could GetCacheDependencies method instead and ironically enough this was, what this method was doing:
[Obsolete("Use GetCacheDependencies() instead.")]
protected virtual List<string> GetDependencyCacheKeys(string key, string context)
cs.CacheDependency = CacheHelper.GetCacheDependency(nodeDependencies);
This is what they told me and at this moment is incomprehensible to me because I'm still not sure, what to use to update this code. I need a list of keys for the tree node object so then I can put it to CacheHelper.GetCacheDependency(...) method.