예제 #1
0
        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");
        }
예제 #2
0
 /// <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");
 }