Update Document's Link cache only if a link-classified elem is changed
Added tests for Document's Link cache