Commit Graph

127 Commits

Author SHA1 Message Date
Stephan
464711d3c8 U4-10026 - use id-key map for getting by guid 2017-06-16 14:09:20 +02:00
Shannon
cb539e82d0 Merge remote-tracking branch 'origin/dev-v7' into dev-v7.6
# Conflicts:
#	build/UmbracoVersion.txt
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Core/Persistence/Repositories/DataTypeDefinitionRepository.cs
#	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
#	src/Umbraco.Web/Models/Mapping/MediaModelMapper.cs
#	src/UmbracoExamine/UmbracoMemberIndexer.cs
2017-03-29 18:11:51 +11:00
Shannon
9eb415d398 U4-9682 Repository's have a double nested DeepCloneRuntimeCacheProvider set which means all entities are double deep cloned in and out of the cache and ensures that PreValueCollections are not also manually deep cloned. 2017-03-28 15:41:55 +11:00
Stephan
08c8b84a10 U4-9462 - cleanup units of work, code, fixmes 2017-02-21 13:19:58 +01:00
Shannon
411bbcc192 Merge branch 'refs/heads/dev-v7.6' into temp-u4-9322
# Conflicts:
#	build/UmbracoVersion.txt
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Core/Services/ContentService.cs
#	src/Umbraco.Core/Services/ContentTypeService.cs
#	src/Umbraco.Core/Services/DataTypeService.cs
#	src/Umbraco.Core/Services/MacroService.cs
#	src/Umbraco.Core/Services/MediaService.cs
#	src/Umbraco.Core/Services/MemberService.cs
#	src/Umbraco.Core/Services/MemberTypeService.cs
#	src/Umbraco.Core/Services/UserService.cs
#	src/Umbraco.Web/Umbraco.Web.csproj
2017-02-03 12:14:38 +11:00
Stephan
4a6844b949 U4-9322 - repository caches, cleanup 2017-01-31 19:36:55 +01:00
Stephan
97a76d5ad4 U4-9322 - introduce ScopeContext that lives longer than Scope, now Xml does not multi-clone! 2017-01-31 16:42:01 +01:00
Stephan
a97b566065 U4-9422 - complete implementing scoped xml cache 2017-01-24 07:59:46 +01:00
Stephan
4ac20de1dd U4-9322 - complete scope repository caches 2017-01-20 16:29:13 +01:00
Stephan
848eaf5e27 U4-9322 - cont. implementing scoped repository caches 2017-01-20 12:08:55 +01:00
Stephan
434703f4ec U4-9322 - begin implementing scoped repository caches 2017-01-19 19:47:09 +01:00
Stephan
4ab7f768fa U4-9322 - backport repository cache policy changes from v8 2017-01-18 18:48:13 +01:00
Shannon
44732e5f52 Merge remote-tracking branch 'refs/remotes/origin/dev-v7' into dev-v7.6
# Conflicts:
#	build/UmbracoVersion.txt
#	src/SolutionInfo.cs
#	src/Umbraco.Core/Configuration/UmbracoVersion.cs
#	src/Umbraco.Core/DatabaseContext.cs
#	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
2017-01-17 18:21:45 +11:00
Shannon
ede342feba Finds all other instances where a reader would be executed inside another reader's loop and fixes 2017-01-16 16:38:23 +11:00
Stephan
36188f00b0 Fix exceptions (more explicit) 2016-09-07 13:24:49 +02:00
Stephan
6ba761df20 Fix null checks in HttpRequestCacheProvider 2016-07-19 15:37:55 +02:00
Shannon
d687fadac3 Performs some null checks in the HttpRequestCacheProvider since if there is no place to cache, it just doesn't do any caching. 2016-07-19 15:07:38 +02:00
Stephan
4531bf6c30 U4-8682 - manage cache in tests 2016-07-06 18:01:59 +02:00
Søren Gregersen
bad1372313 Update ICacheProvider.cs
Not really an abstract class... :)
2016-04-23 15:58:18 +02:00
Shannon
f8045840ee Merge remote-tracking branch 'origin/master-v7' into dev-v7 2016-02-04 11:04:05 +01:00
Shannon
e2985d74e5 U4-7890 XSLT Macro's not working - "Cannot use this obsoleted overload when the current provider" 2016-02-04 11:01:54 +01:00
Shannon
797eb34f36 Fixes merge issues and tests 2016-02-03 13:43:51 +01:00
Shannon
e423864781 Merge remote-tracking branch 'origin/master-v7' into dev-v7
Conflicts:
	build/UmbracoVersion.txt
	src/SolutionInfo.cs
	src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs
	src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicyFactory.cs
	src/Umbraco.Core/Configuration/UmbracoVersion.cs
	src/Umbraco.Core/Persistence/Repositories/ContentTypeBaseRepository.cs
	src/Umbraco.Core/Persistence/Repositories/ContentTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/DomainRepository.cs
	src/Umbraco.Core/Persistence/Repositories/LanguageRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MediaTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs
	src/Umbraco.Core/Persistence/Repositories/PublicAccessRepository.cs
	src/Umbraco.Core/Persistence/Repositories/TemplateRepository.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Cache/FullDataSetCachePolicyTests.cs
	src/Umbraco.Web.UI.Client/src/common/directives/components/grid/grid.rte.directive.js
	src/Umbraco.Web.UI.Client/src/less/hacks.less
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web/WebBootManager.cs
2016-02-03 12:30:11 +01:00
Shannon
1db635f24c Updates DeepCloneableList to support behaviors, for the FullDataSetCachePolicy we only want to clone when writing to cache, not when reading, the cloning will then be done on individual items after filtering by the FullDataSetRepositoryCachePolicy 2016-02-02 01:32:36 +01:00
Shannon
6e27b3d6d4 Fixes up the FullDataSetRepositoryCachePolicy to handle individual items, updates and removes correctly, splits up it's logic so it's not overriding the DefaultRepositoryCachePolicy since that is just different. Adds tests. 2016-02-02 00:47:18 +01:00
Shannon
9a830e5de6 fixes tests 2016-01-27 19:44:36 +01:00
Shannon
6c5e09fd84 Ensures that the main content type repositories are returning the correct result from their GetAll methods. Fixes the FullDataSetRepositoryCachePolicy to ensure that any request with Ids actually returns the result of GetAll and then filters to ensure caching is correct. 2016-01-27 19:26:08 +01:00
Shannon
5d96534678 fixes tests 2016-01-27 19:20:24 +01:00
Shannon
02b74a5059 Fixes FullDataSetRepositoryCachePolicy so that whenever Ids are requested, it retrieves all of the items and then post filters - ensuring there's no additional trips to the database. Fixes MemberTypeRepository so that calls to PerformGet(int) are wrapping the GetAll() call. 2016-01-27 18:51:37 +01:00
Shannon
7a25cb52b2 updates the repository cache policies so that we aren't keeping everything in cache unnecessarily 2016-01-26 19:13:42 +01:00
Shannon
3ecb9d0f86 U4-7807 Domain, language, public access cache (GetAll) caches not working when there are no items 2016-01-22 17:05:27 +01:00
Shannon
f78a425985 U4-7816 The IsolatedCache instance in the RepositoryFactory differs from the ApplicationContext singleton instance 2016-01-22 16:37:47 +01:00
Shannon
b5abbc7c30 Adds some null checks 2016-01-14 18:11:48 +01:00
Shannon
bfa12856db Fixes issue with DefaultRepositoryCachePolicy when creating new items - we were generating the cache key before actually calling the method to create the item therefore there was no id assigned yet (it would be zero). 2016-01-14 16:36:03 +01:00
Shannon
2b13297c36 Changes method name to be shorter and makes internal instead of protected. 2016-01-07 19:27:59 +01:00
Shannon
d7a142e724 Refactors DictionaryItem and DictionaryTranslation so that the attached ILanguage entity is not cached nor cloned. This will save on lots of memory and cloning cycles especially if there are quire a few dictioanry items. Unfortunatley to achieve this requires a not so pretty hack where we need to assign an internal callback to the model so it knows how to retrieve the language when it needs it. In v8, the ILanguage entity will not be attached at all. This also fixes a cache refresher issue for when a language is deleted -> all dictionary cache must be removed. This commit also changes a method name: ClearAllIsolatedCacheByRepositoryEntityType 2016-01-07 18:44:04 +01:00
Shannon
63785ae70f Adds cache policy tests 2016-01-07 17:54:55 +01:00
Shannon
68aa6ff093 Moves repository caching logic into new CachePolicies. 2016-01-07 16:31:20 +01:00
Shannon
ff829d49a3 Updates all cache refreshers to reference the IsolatedRuntimeCache where required, refactors how IsolatedRuntimeCache is exposed on the CacheHelper, ensures that IsolatedRuntimeCache is used in all repositories instead of the global RuntimeCache, changes all obsolete usages of CacheHelper to the non obsolete equivalent, obsoletes many of the cache keys, obsoletes a couple cache refreshers that aren't used anymore in 7.3, simplifies CacheHelper with regards to it's 'disabled' cache state. 2016-01-06 18:08:14 +01:00
Shannon
4f40fff5ee Moves DeepCloneRuntimeCacheProvider to Cache namespace. Creates DeepCloneableList + tests. Updates RepositoryBase to use DeepCloneableList when GetAllCacheAsCollection is used (so that all entries that get cached are deep cloned into and out-of the cache). Adds test for DeepCloneRuntimeCacheProvider for dealing with this list type. 2016-01-06 14:17:51 +01:00
Stephan
d83fdb48c9 Merge branch 7.2.7 into dev-v7
Conflicts:
	build/UmbracoVersion.txt
	src/SolutionInfo.cs
	src/Umbraco.Core/ApplicationContext.cs
	src/Umbraco.Core/AsyncLock.cs
	src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs
	src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs
	src/Umbraco.Core/CoreBootManager.cs
	src/Umbraco.Core/Logging/LogHelper.cs
	src/Umbraco.Core/PluginManager.cs
	src/Umbraco.Core/Sync/ServerEnvironmentHelper.cs
	src/Umbraco.Core/TypeFinder.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs
	src/Umbraco.Tests/ServerEnvironmentHelperTests.cs
	src/Umbraco.Web.UI.Client/bower.json
	src/Umbraco.Web.UI.Client/gruntFile.js
	src/Umbraco.Web.UI.Client/src/less/grid.less
	src/Umbraco.Web.UI.Client/src/less/panel.less
	src/Umbraco.Web.UI.Client/src/less/property-editors.less
	src/Umbraco.Web.UI.Client/src/loader.js
	src/Umbraco.Web.UI.Client/src/views/propertyeditors/datepicker/datepicker.controller.js
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlCacheFilePersister.cs
	src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs
	src/Umbraco.Web/Scheduling/KeepAlive.cs
	src/Umbraco.Web/Scheduling/LatchedBackgroundTaskBase.cs
	src/Umbraco.Web/Scheduling/LogScrubber.cs
	src/Umbraco.Web/Scheduling/RecurringTaskBase.cs
	src/Umbraco.Web/Scheduling/ScheduledPublishing.cs
	src/Umbraco.Web/Scheduling/ScheduledTasks.cs
	src/Umbraco.Web/Scheduling/Scheduler.cs
	src/Umbraco.Web/UI/JavaScript/JsInitialize.js
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/content.cs
	src/umbraco.cms/Actions/Action.cs
2015-07-13 22:45:37 +02:00
Shannon
e69422c8d8 Fixes tests (backports cache fix by name) 2015-07-08 18:14:31 +02:00
Shannon
04976f8063 U4-6202 - cache clearing by object type
Conflicts:
	src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs
2015-07-08 11:08:19 +02:00
Shannon
3e7c9fc81e Fixes: U4-6202 Cache not clearing by object type properly
Conflicts:
	src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs
2015-07-08 11:07:53 +02:00
Stephan
115ba8dcb8 Merge remote-tracking branch 'origin/dev-v7' into 7.3.0
Conflicts:
	src/Umbraco.Tests/Scheduling/BackgroundTaskRunnerTests.cs
	src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs
	src/Umbraco.Web/Scheduling/BackgroundTaskRunnerAwaiter.cs
	src/Umbraco.Web/Umbraco.Web.csproj
2015-05-21 20:49:18 +02:00
Stephan
b804ff6107 Explicit exception on cache reentry 2015-05-21 16:09:20 +02:00
Shannon
a94f7e6ec0 Fixes RepositoryBase.Get to not use a GetOrAdd with the IRuntimeCache and instead just use a linear lookup, set cache, return - this causes less confusion and also prevents any inner recursive key lookups within our cache which was causing YSODs. Added tests for the RepositoryBase's DeepCloneRuntimeCacheProvider (see code comment about what this does), updates other repo's to use the RuntimeCache property instead of accessing it via the RepositoryCache.RuntimeCache property. 2015-05-21 17:04:14 +10:00
Shannon
9e223eb891 Merge remote-tracking branch 'origin/dev-v7' into 7.3.0
Conflicts:
	src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs
	src/Umbraco.Core/CoreBootManager.cs
	src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs
	src/Umbraco.Web/umbraco.presentation/content.cs
2015-05-20 16:24:17 +10:00
Stephan
dbaf7c0190 U4-6597 - fix issue with caches that would cache exceptions 2015-05-19 09:24:38 +02:00
Stephan
16e06b6d4d Revert 444a028, 0e5a469 and 9d8f33e 2015-05-19 09:24:25 +02:00