Example #1
0
 public RedisCache(ISerializer objectSerializer
                   , ICacheDefaultSettings cacheSettings
                   , IDatabase database)
 {
     _objectSerializer = objectSerializer ?? throw new ArgumentNullException(nameof(objectSerializer));
     _cacheSettings    = cacheSettings ?? throw new ArgumentNullException(nameof(cacheSettings));
     _database         = database ?? throw new ArgumentNullException(nameof(database));
 }
Example #2
0
 public InMemoryCache(IMemoryCache memoryCache
                      , ISerializer objectSerializer
                      , ICacheDefaultSettings cacheSettings)
 {
     this._memoryCache      = memoryCache ?? throw new ArgumentNullException(nameof(memoryCache));
     this._objectSerializer = objectSerializer ?? throw new ArgumentNullException(nameof(objectSerializer));
     this._cacheSettings    = cacheSettings ?? throw new ArgumentNullException(nameof(cacheSettings));
 }