Closed AndreiMaz closed 7 years ago
(nopCommerce - 3.80) In redis cache i am using db 14. For this i have updated my connection string like this :-
ConnectionString="xxx:6380,password=xxxx,ssl=True,abortConnect=False,defaultDatabase=14,syncTimeout=100000"
When i am updating the settings from admin it removes the setting from cache by pattern :-
public virtual void RemoveByPattern(string pattern) { foreach (var ep in _connectionWrapper.GetEndpoints()) { var server = connectionWrapper.Server(ep); var keys = server.Keys(pattern: "" + pattern + "_"); foreach (var key in keys) _db.KeyDelete(key); } }
but databaseid is missing and it is taking 0 as default dbId.
please resolve this issue in upcoming build.
var keys = server.Keys(database: db.Database, pattern: "" + pattern + "_");
Contribution: http://www.nopcommerce.com/boards/t/40988/incorrect-redis-client-implementation-in-nop-370-causes-high-cpu-extraneous-threads-general-resource-consumption-slowed-response.aspx
also see comment at http://www.nopcommerce.com/boards/t/40988/incorrect-redis-client-implementation-in-nop-370-causes-high-cpu-extraneous-threads-general-resource-consumption-slowed-response.aspx#163901 (reverted code back)
also see http://www.nopcommerce.com/boards/t/39414/azure-redis-problem.aspx
also see http://www.nopcommerce.com/boards/t/41511/optimization-of-rediscachemanagers-removebypattern-method.aspx
Also make it configurable (web.config setting)
let's discuss it before implementation
also see - https://github.com/nopSolutions/nopCommerce/issues/2287