PropertyValueConverter - more WIP

This commit is contained in:
Stephan
2017-07-27 11:09:53 +02:00
parent 76569d58fe
commit 4bfea6044a
10 changed files with 551 additions and 148 deletions

View File

@@ -55,7 +55,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
}
public override bool HasValue => _sourceValue != null
&& ((_sourceValue is string) == false || string.IsNullOrWhiteSpace((string)_sourceValue) == false);
&& (!(_sourceValue is string) || string.IsNullOrWhiteSpace((string) _sourceValue) == false);
private class CacheValues
{

View File

@@ -27,13 +27,13 @@ namespace Umbraco.Web.PublishedCache.NuCache
// snapshot cache (if we don't want to pollute the snapshot cache with short-lived
// data) depending on settings
// for members, always cache in the facade cache - never pollute snapshot cache
var facade = (Facade)_facadeAccessor.Facade;
var facade = (Facade) _facadeAccessor.Facade;
var cache = facade == null
? null
: ((IsPreviewing == false || FacadeService.FullCacheWhenPreviewing) && (IsMember == false)
? facade.SnapshotCache
: facade.FacadeCache);
return GetCacheValues(cache);
return GetCacheValues(cache);
}
protected override CacheValues GetFacadeCacheValues()