MichaCo / CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
http://cachemanager.michaco.net
Apache License 2.0
2.34k stars 457 forks source link

Unable to get and Add from CacheManager #257

Closed vanikulkarniAtFIS closed 5 years ago

vanikulkarniAtFIS commented 5 years ago

I am using .net core to retrieve data from Cache Manager Please see the image below for error details.

cache.GetCacheItem(key) Evaluation requires a thread to run temporarily. Use the Watch window to perform the evaluation.

Please advice how to resolve this

capture

Exception StackExchange.Redis.RedisServerException HResult=0x80131500 Message=ERR Error running script (call to f_470632c50facee1fc1dd5507cab34408d94728fa): @user_script:2: WRONGTYPE Operation against a key holding the wrong kind of value Source=StackExchange.Redis.StrongName StackTrace: at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 2128 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\RedisBase.cs:line 81 at CacheManager.Redis.RedisCacheHandle1.Eval(ScriptType scriptType, RedisKey redisKey, RedisValue[] values, CommandFlags flags) at CacheManager.Redis.RedisCacheHandle1.<>c__DisplayClass48_0.b0() at CacheManager.Redis.RetryHelper.Retry[T](Func1 retryme, Int32 timeOut, Int32 retries, ILogger logger) at CacheManager.Redis.RedisCacheHandle1.Retry[T](Func1 retryme) at CacheManager.Redis.RedisCacheHandle1.GetCacheItemAndVersion(String key, String region, Int32& version) at CacheManager.Redis.RedisCacheHandle1.GetCacheItemInternal(String key, String region) at CacheManager.Core.BaseCacheManager1.GetCacheItemInternal(String key, String region) at CacheManager.Core.Internal.BaseCache1.Get(String key) at FIS.Ambit.Optimist.Api.Services.CalculationService.RecalculateModelAccountsOnValueChange(Guid modelId, IList1 changedAccounts, Boolean useWhatIfAccounts, Boolean saveChangedAccounts) in C:\Projects\poc-optimist-calc-engine\server\Optimist.Core.CalculationEngine\ApiServices\CalculationService.cs:line 57 at CalulationService.CalculationApiController.InputQueueReceivedMessage(Notification notification) in C:\Projects\poc-optimist-calc-engine\server\CalculationService\CalculationApiController.cs:line 56 at CalulationService.ComponentHost.DummyInputQueue(Notification notification) in C:\Projects\poc-optimist-calc-engine\server\CalculationService\ComponentHost.cs:line 72 at FIS.Risk.Core.Messaging.InMemoryPublishSubscribeSystem.InMemorySubscription.Receive(Notification notification) at FIS.Risk.Core.Messaging.InMemoryPublishSubscribeSystem.Publish(Notification notification) at CalulationService.CalculationApiController.RecalculateModelAccountsOnValueChange(Guid modelId, String connectionId, IEnumerable`1 changedAccounts) in C:\Projects\poc-optimist-calc-engine\server\CalculationService\CalculationApiController.cs:line 126 at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters) at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.d12.MoveNext()

vanikulkarniAtFIS commented 5 years ago

It was the problem with some existing data in the redis sever