johnnycardy / stackredis.l1 Goto Github PK
View Code? Open in Web Editor NEW.NET in-Memory "L1" cache for StackExchange.Redis.
License: MIT License
.NET in-Memory "L1" cache for StackExchange.Redis.
License: MIT License
I've got strange error of a type: System.TypeLoadException with StackExchage.Redis v.1.2.4
Method 'GeoAdd' in type 'StackRedis.L1.RedisL1Database' from assembly 'StackRedis.L1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Getting this error. Possibly caused by multiple concurrent clients operating on the disjointed set.
Need to reproduce with a unit test.
Collection was modified after the enumerator was instantiated., Stack Trace: at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.SortedSet1.Enumerator.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__1
2.MoveNext()
at StackRedis.L1.MemoryCache.Types.SortedSet.DisjointedSortedSet.Add(SortedSetEntry[] entries, Nullable1 knownMin, Nullable
1 knownMax)
at StackRedis.L1.MemoryCache.Types.SortedSet.MemorySortedSet.AddDiscontinuous(String key, SortedSetEntry[] entries)
at StackRedis.L1.RedisL1Database.SortedSetAdd(RedisKey key, SortedSetEntry[] values, CommandFlags flags)
There's an error in constructor: StackRedis.L1.RedisL1Database(IDatabase redisDb)
Method 'HashStringLength' in type 'StackRedis.L1.RedisL1Database'
from assembly 'StackRedis.L1, Version=0.2.1.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Package versions used:
<package id="StackExchange.Redis" version="2.2.88" targetFramework="net462" />
<package id="StackRedis.L1" version="0.2.1" targetFramework="net462" />
<package id="CachingFramework.Redis" version="12.0.6" targetFramework="net462" />
Connection is valid, able to work with db using StackExchange.Redis.IDatabase instance
The risk to data validity in this project is that data may become stale if keyspace notifications are not delivered. Delivery is not guaranteed.
For that reason, it should be possible to expire in-memory cached data after a specific minimum interval.
I cannot get StrackRedis.L1
to work with ASP.NET Core distributed cache.
It's configured as following:
services.AddStackExchangeRedisCache(options =>
{
options.Configuration = distributedCacheConfig.ConnectionString;
options.ConnectionMultiplexerFactory = async () =>
{
var mux = await ConnectionMultiplexer.ConnectAsync(options.Configuration);
_ = new StackRedis.L1.RedisL1Database(mux.GetDatabase());
return mux;
};
});
When running the application the RedisL1Database
constructor gets called with no errors. However it does not seems like the in-memory cache layer is being used at all and Redis is instead being used as normal. Expecting the console to write mem cache hits. Also tired to set breakpoints inside L1 project with no hits.
I'm are running master of this project with Microsoft.Extensions.Caching.StackExchangeRedis/6.0.1 and StackExchange.Redis/2.2.4.
Should L1 work with ASP.NET Core distributed cache?
Is there anything wrong in my configuration?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.