コード例 #1
0
 public PersistentCacheService(IFileDataStorage storage, string dataKey)
 {
     this.storage = storage;
     this.dataKey = dataKey;
 }
コード例 #2
0
        public static ISimilarityAlgorithm WithPersistentCache <T>(this IHashingAlgorithm <T> alg, IFileDataStorage storage)
            where T : IBinarySerializable, new()
        {
            var cache = new PersistentCacheService <T>(storage, alg.Name);

            return(new CachingSimilarityAlgorithm <T>(cache, alg));
        }