Implement basic fallback plumbing (in progress)

This commit is contained in:
Stephan
2018-05-02 13:38:45 +02:00
parent 211267d500
commit d56af5872d
26 changed files with 270 additions and 154 deletions

View File

@@ -189,18 +189,6 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache
public override PublishedContentType ContentType => _contentType;
// override to implement cache
// cache at context level, ie once for the whole request
// but cache is not shared by requests because we wouldn't know how to clear it
public override IPublishedProperty GetProperty(string alias, bool recurse)
{
if (recurse == false) return GetProperty(alias);
var key = $"XmlPublishedCache.PublishedMediaCache:RecursiveProperty-{Id}-{alias.ToLowerInvariant()}";
var cacheProvider = _cacheProvider;
return cacheProvider.GetCacheItem<IPublishedProperty>(key, () => base.GetProperty(alias, true));
}
private readonly List<string> _keysAdded = new List<string>();
private int _id;
private Guid _key;