public PersistentCacheService(IFileDataStorage storage, string dataKey) { this.storage = storage; this.dataKey = dataKey; }
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)); }