Fixes up dictionary and language repositories to have underlying simple get repositories since they support getting by id, unique id and string variations but we want to have native repository enabled caching for these items so these get methods now use private repositories based on these keys. Adds more tests, removes N+1 queries for languages and dictionary items. Removes RuntimeCacheProvider, we only want one type of cache, this simplifies things a lot.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Caching;
|
||||
@@ -27,7 +28,8 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
public override void Refresh(int id)
|
||||
{
|
||||
RuntimeCacheProvider.Current.Clear(typeof(IDictionaryItem));
|
||||
//RuntimeCacheProvider.Current.Clear(typeof(IDictionaryItem));
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheObjectTypes<IDictionaryItem>();
|
||||
//global::umbraco.cms.businesslogic.Dictionary.ClearCache();
|
||||
//when a dictionary item is updated we must also clear the text cache!
|
||||
//global::umbraco.cms.businesslogic.language.Item.ClearCache();
|
||||
@@ -36,7 +38,8 @@ namespace Umbraco.Web.Cache
|
||||
|
||||
public override void Remove(int id)
|
||||
{
|
||||
RuntimeCacheProvider.Current.Clear(typeof(IDictionaryItem));
|
||||
//RuntimeCacheProvider.Current.Clear(typeof(IDictionaryItem));
|
||||
ApplicationContext.Current.ApplicationCache.RuntimeCache.ClearCacheObjectTypes<IDictionaryItem>();
|
||||
//global::umbraco.cms.businesslogic.Dictionary.ClearCache();
|
||||
//when a dictionary item is removed we must also clear the text cache!
|
||||
//global::umbraco.cms.businesslogic.language.Item.ClearCache();
|
||||
|
||||
Reference in New Issue
Block a user