/// <summary> /// .ctor /// </summary> /// <param name="cacheSession">Backing CacheSession for content and fingerprint calls</param> /// <param name="cache">Backing cache.</param> /// <param name="cacheId">Id of the parent cache that spawned the session.</param> /// <param name="logger">Diagnostic logger</param> /// <param name="sessionId">Telemetry ID for the session.</param> public MemoizationStoreAdapterCacheCacheSession( BuildXL.Cache.MemoizationStore.Interfaces.Sessions.ICacheSession cacheSession, BuildXL.Cache.MemoizationStore.Interfaces.Caches.ICache cache, string cacheId, ILogger logger, string sessionId = null) : base(cacheSession, cache, cacheId, logger, sessionId) { }
/// <summary> /// .ctor /// </summary> /// <param name="cacheSession">Backing CacheSession for content and fingerprint calls</param> /// <param name="cache">Backing cache.</param> /// <param name="cacheId">Id of the parent cache that spawned the session.</param> /// <param name="logger">Diagnostic logger</param> /// <param name="sessionId">Telemetry ID for the session.</param> /// <param name="replaceExistingOnPlaceFile">If true, replace existing file on placing file from cache.</param> public MemoizationStoreAdapterCacheCacheSession( BuildXL.Cache.MemoizationStore.Interfaces.Sessions.ICacheSession cacheSession, BuildXL.Cache.MemoizationStore.Interfaces.Caches.ICache cache, CacheId cacheId, ILogger logger, string sessionId = null, bool replaceExistingOnPlaceFile = false) : base(cacheSession, cache, cacheId, logger, sessionId, replaceExistingOnPlaceFile) { }
/// <summary> /// .ctor /// </summary> /// <param name="cacheId">Telemetry ID for the cache.</param> /// <param name="innerCache">A CS2 ICache for which this layer will translate.</param> /// <param name="logger">For logging diagnostics.</param> /// <param name="statsFile">A file to write stats about the cache into.</param> public MemoizationStoreAdapterCache(string cacheId, BuildXL.Cache.MemoizationStore.Interfaces.Caches.ICache innerCache, ILogger logger, AbsolutePath statsFile) { Contract.Requires(cacheId != null); Contract.Requires(innerCache != null); Contract.Requires(logger != null); CacheId = cacheId; m_cache = innerCache; m_logger = logger; m_statsFile = statsFile; m_fileSystem = new PassThroughFileSystem(m_logger); }
/// <summary> /// .ctor /// </summary> /// <param name="readOnlyCacheSession">Backing ReadOnlyCacheSession for content and fingerprint calls</param> /// <param name="cache">Backing cache.</param> /// <param name="cacheId">Id of the parent cache that spawned the session.</param> /// <param name="logger">Diagnostic logger</param> /// <param name="sessionId">Telemetry ID for the session.</param> public MemoizationStoreAdapterCacheReadOnlySession( IReadOnlyCacheSession readOnlyCacheSession, BuildXL.Cache.MemoizationStore.Interfaces.Caches.ICache cache, string cacheId, ILogger logger, string sessionId = null) { ReadOnlyCacheSession = readOnlyCacheSession; Cache = cache; Logger = logger; CacheId = cacheId; CacheSessionId = sessionId; SessionEntries = sessionId == null ? null : new ConcurrentDictionary <StrongFingerprint, int>(); }
/// <summary> /// .ctor /// </summary> /// <param name="cacheId">Telemetry ID for the cache.</param> /// <param name="innerCache">A CS2 ICache for which this layer will translate.</param> /// <param name="logger">For logging diagnostics.</param> /// <param name="statsFile">A file to write stats about the cache into.</param> /// <param name="replaceExistingOnPlaceFile">When true, replace existing file when placing file.</param> /// <param name="implicitPin">ImplicitPin to be used when creating sessions.</param> public MemoizationStoreAdapterCache( CacheId cacheId, BuildXL.Cache.MemoizationStore.Interfaces.Caches.ICache innerCache, ILogger logger, AbsolutePath statsFile, bool replaceExistingOnPlaceFile = false, ImplicitPin implicitPin = ImplicitPin.PutAndGet) { Contract.Requires(cacheId != null); Contract.Requires(innerCache != null); Contract.Requires(logger != null); CacheId = cacheId; m_cache = innerCache; m_logger = logger; m_statsFile = statsFile; m_fileSystem = new PassThroughFileSystem(m_logger); m_replaceExistingOnPlaceFile = replaceExistingOnPlaceFile; m_implicitPin = implicitPin; }
/// <nodoc /> public VirtualizedContentCache(ICache cache, VfsCasConfiguration configuration) : base(Guid.NewGuid(), passContentToMemoization: false) { _cache = cache; _configuration = configuration; }