public PersistentCache(string filename, CacheItemPersister persister, long maxSize) { this.maxSize = maxSize; this.persister = persister; this.dataFile = new FileInfo(filename); this.lockFile = new LockFile(filename + ".lock"); }
/// <summary> /// Initializes a new instance of the <see cref="PersistentCache"/> for the given filename and cache type. /// </summary> /// <param name="filename"></param> /// <param name="persister"></param> public PersistentCache(string filename, CacheItemPersister persister) { this.persister = persister; //Windows.Storage.Streams.StreamReference sr = Windows.Storage.Streams.StreamReference.CreateFromUri(new Uri(filename)); //this.dataFile = new FileInformation(filename); this.lockFile = new LockFile(filename + ".lock"); }
private DateTime timestamp; // last-modified time of dataFile when cache data was last known to be in sync #endregion Fields #region Constructors /// <summary> /// Initializes a new instance of the <see cref="PersistentCache"/> for the given filename and cache type. /// </summary> /// <param name="filename"></param> /// <param name="persister"></param> public PersistentCache(string filename, CacheItemPersister persister) { this.persister = persister; dataFile = new FileInfo(filename); lockFile = new LockFile(filename + ".lock"); }
/// <summary> /// Initializes a new instance of the <see cref="PersistentCache"/> for the given filename and cache type. /// </summary> /// <param name="filename"></param> /// <param name="persister"></param> public PersistentCache(string filename, CacheItemPersister persister) { this.persister = persister; dataFile = new FileInfo(filename); lockFile = new LockFile(filename + ".lock"); }