Commit Graph

20 Commits

Author SHA1 Message Date
Shannon Deminick
e97a01c75c Fixes: #U4-1992 - Creates DictionaryCacheRefresher to ensure that all cache associated with the dictionary is updated amongst all
servers when it is changed/removed. Removes RemoveByJson as we only actually require RefreshByJson since we can put any sort of parameters
in a custom json string including whether it is a remove operation (if required)
2013-03-23 01:59:25 +06:00
Shannon Deminick
e8dd56786b Fixes: #U4-1986 - data type cache is not refreshed in load balanced environments. 2013-03-22 05:04:32 +06:00
Shannon Deminick
ee2f2dfda0 Fixes: #U4-1981 - ensures template cache is properly refreshed amonsgst all servers 2013-03-22 02:08:55 +06:00
Shannon Deminick
9d6b38a1c1 Fixes: #U4-1980 - stylesheet and stylesheet property cache is not refreshed in load balanced environments. 2013-03-22 01:49:34 +06:00
Shannon Deminick
f6490a897a Fixes: #U4-1978 - Creates DomainCacheRefresher - domain cache is now refreshed across all servers 2013-03-22 00:49:07 +06:00
Shannon Deminick
ce8f5c167c Fixes: #U4-1933 - Adds LanguageCacheRefresher, removes the invalidate cache calls from within the legacy language object. 2013-03-22 00:35:15 +06:00
Shannon Deminick
5f242aa3f6 Converts the media cache refresher to be a json cache refresher since it was impossible before to have media cache
cleared when media was deleted. Created base classes for cache refreshers, we now have a new event - CacheUpdated
which can now be used by code to execute on each individual server when any cache refresher is updated. Listening to events
normally only fire on the individual server so if people are wanting to refresh their own cache there was previously no way
to do that.
2013-03-21 22:53:58 +06:00
Shannon Deminick
52f05612ad Adds another method of distributed cache syncing using a custom json payload. this is necessary for things like ContentType cache
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
2013-03-21 08:38:18 +06:00
Shannon Deminick
23bb0e3ac3 Fixes: #U4-1930, #U4-1928, #U4-1929 - addes ContentTypeCacheRefresher to ensure that content type cache is cleared
in load balanced scenarios. Cleans up a bit of code too.
2013-03-16 08:47:55 +06:00
Shannon Deminick
2dea4a1d70 updates more cache handling, fixes syntax error in examineindex.release.config, fixes the DefaultServerMessenger ctor
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.
2013-03-16 01:37:05 +06:00
Shannon Deminick
860c8c1002 Fixes: #U4-482, #U4-549. Macro cache streamlining - ensures it is cleared based on event handling instead of inline everywhere
in code. Unit tests for CacheHelper, unit tests for umbraco.macro, updates to
ObjectExtensions.TryConvertTo + unit tests, enhanced disposable method of ApplicationContext.
2013-03-12 22:58:21 +04:00
Shannon Deminick
cf64c0243c MacroCacheRefresher also implements ICacheRefresher<macro> 2013-03-12 17:08:31 +04:00
Shannon Deminick
8d2e466e34 Changes MediaCacheRefresher to be ICacheRefresher<T> and updates MacroCacheRefresher to use correct
macro object.
2013-03-12 03:11:35 +04:00
Shannon Deminick
ec46d65bb4 Streamlines how macro cache is handled 2013-03-12 03:00:42 +04:00
Shannon Deminick
7f51e01be7 Created strongly typed ICacheRefresher<T> so that now we can have cache refreshers execute against a
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.
2013-02-12 07:35:47 +06:00
Shannon Deminick
cb3ac17f43 Ensures tree is synced on bulk publish, fixes Dimming on the content node. Starts adding ability to
make distributed calls that are strongly typed and can do more than one at a time.
2013-02-12 04:47:36 +06:00
Shannon Deminick
8dc5092763 Fixes: #U4-1697 - streamlines user cache invalidation/adds new UserCacheRefresher. 2013-02-12 04:13:29 +06:00
Shannon Deminick
c0b708b1f4 Streamlines how Media cache gets invalidated - ensures Save() is called on media where it was needed,
cache now gets invalidated on events.
2013-02-07 05:53:59 +06:00
Shannon Deminick
d93ca26181 Streamlines how Template cache gets invalidated - ensures Save() is called on templates where it was needed,
cache now gets invalidated on events.
2013-02-07 05:26:53 +06:00
Shannon Deminick
75e747a2d2 Simplifies clearing cache for macro's all is done via the DistributedCache.Instance - hopefully all cache will be invalidated
via this method so that all cache types are simply invalidated with ICacheRefreshers and ApplicationEventHandlers. Currently we
have calls to clear cache in zillions of places and its near impossible to tell where/when it currently happens.
2013-02-07 04:26:48 +06:00