We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the ShareCacheStruct LoadItemFactory function can solve my problem as below
`protected override bool LoadItemFactory(string key, bool isReplace) { //string redisKey = CreateRedisKey(key); //var schema = SchemaTable(); //if (schema != null && schema.AccessLevel == AccessLevel.ReadWrite) //{ // int periodTime = schema.PeriodTime; // List dataList; // if (DataContainer.TryLoadHistory(redisKey, out dataList)) // { // InitCache(dataList, periodTime); // return true; // } // else // { // return false; // } //} string redisKey = CreateRedisKey(key); TransReceiveParam receiveParam = new TransReceiveParam(redisKey); receiveParam.Schema = SchemaTable(); int periodTime = receiveParam.Schema.PeriodTime; int maxCount = receiveParam.Schema.Capacity;
var provider = Data.DbConnectionProvider.CreateDbProvider(receiveParam.Schema); if (receiveParam.Schema.StorageType.HasFlag(StorageType.ReadOnlyDB) || receiveParam.Schema.StorageType.HasFlag(StorageType.ReadWriteDB)) { if (provider == null) { TraceLog.WriteError("Not found db connection of {0} entity.", receiveParam.Schema.EntityName); return false; } var filter = new DbDataFilter(maxCount); if (!string.IsNullOrEmpty(key)) { string[] keyValues = key.Split('-'); for (int i = 0; i < receiveParam.Schema.Keys.Length; i++) { filter.Condition = provider.FormatFilterParam(receiveParam.Schema.Keys[i]); filter.Parameters.Add(receiveParam.Schema.Keys[i], keyValues[i]); } } receiveParam.DbFilter = filter; } List<T> dataList; if (DataContainer.TryReceiveData(receiveParam, out dataList)) { InitCache(dataList, periodTime, isReplace); return true; } else { return false; } }`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Change the ShareCacheStruct LoadItemFactory function can solve my problem as below
`protected override bool LoadItemFactory(string key, bool isReplace)
{
//string redisKey = CreateRedisKey(key);
//var schema = SchemaTable();
//if (schema != null && schema.AccessLevel == AccessLevel.ReadWrite)
//{
// int periodTime = schema.PeriodTime;
// List dataList;
// if (DataContainer.TryLoadHistory(redisKey, out dataList))
// {
// InitCache(dataList, periodTime);
// return true;
// }
// else
// {
// return false;
// }
//}
string redisKey = CreateRedisKey(key);
TransReceiveParam receiveParam = new TransReceiveParam(redisKey);
receiveParam.Schema = SchemaTable();
int periodTime = receiveParam.Schema.PeriodTime;
int maxCount = receiveParam.Schema.Capacity;
The text was updated successfully, but these errors were encountered: