updates especially when deleting one since we require all sorts of Ids from the object but the object will be deleted by the time
the request reaches other servers so instead we create a json payload to send to other servers which contains all information necessary
to refresh/clear the cache on the other servers. This will probably be the preferred way going forward to handle cache refreshing.
With this in place, when removing a conent type cache is removed based on events.
This also adds a 'class' generic argument constraint to the repository base classes to guarantee we can do null checks and then we also
fix a null check on RepositoryBase. Updates the Entity class to properly support tracking properties - this now allows us to determine if
an entity was new, which is now used to ensure we don't re-update all of the content cache when a new content type is created.
Have also changed the deletion and creation of document types to use the new API, this allows for a lot less processing and streamlining how
all cache is invalidated. Fixes the construction of a new Template and Content Type in the v6 api and ensures that default values are set - #U4-1972, #U4-1971
media types, also ensures that the route cache is cleared (#U4-1969). Changes the deletion of media and
doc types to use the new Api - this ensures that cache is refreshed properly.
to be lazy since the db context isn't initialized yet (will speed up start a bit too), ensures that the macro/xslt caching
clearing is only done on the single server instead or re-posing another distributed call.
in code. Unit tests for CacheHelper, unit tests for umbraco.macro, updates to
ObjectExtensions.TryConvertTo + unit tests, enhanced disposable method of ApplicationContext.
real instance object like IContent, this will dramatically increase performance for bulk publishing when not
in a load balanced environment. Updated methods on DistributedCache to refresh many instances at one time, this also
means we're not re-looking it back up again. Need to update media, users, templates, members and macros to use this new feature too.