File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
dotnet/src/dotnetframework/Providers/Cache/GxMemcached Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -47,16 +47,16 @@ MemcachedClient InitCache()
4747
4848#if NETCORE
4949 var loggerFactory = new Microsoft . Extensions . Logging . Abstractions . NullLoggerFactory ( ) ;
50- MemcachedClientConfiguration config = new MemcachedClientConfiguration ( loggerFactory , new MemcachedClientOptions ( ) ) ;
51- #else
52- MemcachedClientConfiguration config = new MemcachedClientConfiguration ( ) ;
53- #endif
50+ MemcachedClientOptions options = new MemcachedClientOptions ( ) ;
5451 if ( ! String . IsNullOrEmpty ( username ) || ! String . IsNullOrEmpty ( password ) )
5552 {
56- config . Authentication . Type = typeof ( PlainTextAuthenticator ) ;
57- config . Authentication . Parameters [ "userName" ] = username ;
58- config . Authentication . Parameters [ "password" ] = password ;
53+ options . AddPlainTextAuthenticator ( string . Empty , username , password ) ;
5954 }
55+ MemcachedClientConfiguration config = new MemcachedClientConfiguration ( loggerFactory , options ) ;
56+ #else
57+
58+ MemcachedClientConfiguration config = new MemcachedClientConfiguration ( ) ;
59+ #endif
6060 if ( ! String . IsNullOrEmpty ( address ) )
6161 {
6262 foreach ( string host in address . Split ( ',' , ';' , ' ' ) ) {
You can’t perform that action at this time.
0 commit comments