Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free. Learn more →
Top 15 C# Cache Projects
-
Akavache
An asynchronous, persistent key-value store created for writing desktop and mobile applications, based on SQLite3. Akavache is great for both storing important data as well as cached local data that expires.
You can check out akavache: https://github.com/reactiveui/Akavache
-
CacheManager
CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
Leverage Frameworks and Libraries: Numerous libraries and frameworks are available for .NET that can simplify caching implementation and management. Examples include CacheManager, EasyCaching, and LazyCache. Evaluate these options to see if they meet your requirements and can help streamline your caching strategy.
-
SonarQube
Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.
-
EasyCaching
:boom: EasyCaching is an open source caching library that contains basic usages and some advanced usages of caching which can help us to handle caching more easier!
-
Lazy Cache
An easy to use thread safe in-memory caching service with a simple developer friendly API for c#
Leverage Frameworks and Libraries: Numerous libraries and frameworks are available for .NET that can simplify caching implementation and management. Examples include CacheManager, EasyCaching, and LazyCache. Evaluate these options to see if they meet your requirements and can help streamline your caching strategy.
-
FFImageLoading - Fast & Furious Image Loading
Image loading, caching & transforming library for Xamarin and Windows
I'm fairly sure that you could achieve this using https://github.com/luberda-molinet/FFImageLoading
-
SmartSql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
-
FusionCache
FusionCache is an easy to use, fast and robust cache with advanced resiliency features and an optional distributed 2nd layer.
Project mention: 17 Amazing Community Packages for .NET Developers | reddit.com/r/dotnet | 2023-05-29The most undervalued library from that list is FusionCache. The rest is either well-known (like FluentAssertions) or pretty specific to the guy's experience (like the WPF stuff).
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
No, these clients you mention are part of StackExchange.Redis.Extensions https://github.com/imperugo/StackExchange.Redis.Extensions
-
-
As for the implementation of the grain, I’m leaning heavily on an LRU cache from the package https://github.com/bitfaster/BitFaster.Caching/.
-
-
This has been posted and reposted continuously for a year and I still don’t understand the comparisons in the article. Either use SQLite across the board or use MySQL/Postgres across the board. Or do both. You can even model a self-managed rdbms install on the clouds that don’t have that turnkey offering. But mixing and matching makes no sense.
I’m a huge fan of SQLite and have open sourced some .NET stuff around it (eg https://github.com/neosmart/AspSqliteCache ) but learned a very expensive mistake in using it for an ASP.NET Core Project with the default pattern (i.e. with EF Core).
SQLite locks (tables or the entire db depending on configuration) upon write. If you use shared cache mode and WAL you can get very far with one write thread and many competing reads - depending on shared cache mode, WAL, and other options. I benchmarked the different configurations with one or more writing threads here to show how it scales: https://github.com/mqudsi/sqlite-readers-writers
But this approach is hard to model with EF Core. If you use the default request-scoped DI injected connection, you risk any writes upgrading the read lock to a write lock for the duration of the request. The better approach is to use the default request-scoped connection for RO operations and then request a scoped/transient DI connection for any write ops, but copying internal EF entity tracking state from one EF instance to another is tedious and fraught with issues. You’re at least able to work around this if you try to always keep in mind write transaction lifetimes, though.
The problem comes as soon as you need a “background service” in the sense of “an operation running independently of requests and parallel to them.” If that service needs a write lock for any amount of time, you’re suddenly going to be seeing write timeouts (since default behavior is to poll repeatedly until a write lock is obtained) and that is pretty much impossible to fix.
As one of the biggest advantages of using a resident executor like .NET or Java vs a per-request stateless option like PHP is that you can do stuff independent of requests, SQLite is tricky to use correctly in prod in this model.
The good news is that if you use the SQLite EF provider and run into this, it’s usually not too hard to switch to a real DB provider as a lot of the work is abstracted.
-
fast-cache
The fastest cache library written in C# for items with set expiration time. Easy to use, thread-safe and light on memory.
-
FastCache
7x-10x faster alternative to MemoryCache. A high-performance, lighweight (8KB dll) and thread-safe memory cache for .NET. (by jitbit)
-
OpenWeatherMap.Cache
An asynchronous .NET Standard 2.0 library that allows you to fetch & cache current weather readings from the OpenWeather API, with built-in resiliency that can extend the cache lifetime in case the API is unreachable.
Project mention: AsyncKeyedLock: a library for locking based on a key | reddit.com/r/csharp | 2023-02-13For example I use it in another library I made at https://github.com/MarkCiliaVincenti/OpenWeatherMap.Cache. Here I ensure that if there's an API request to get the weather of a particular location, whilst it's doing so it will not launch another API request to get the weather of the same location concurrently but instead wait for the result of the ongoing call and use the same response.
-
ONLYOFFICE
ONLYOFFICE Docs — document collaboration in your environment. Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises
C# Cache related posts
- Multi level cache library (in memory + Redis)
- Caching in .NET
- In pursuit of the best value US cloud provider
- CollectionView all items Quadratic
- Microsoft Orleans: Grain Caches
- Learn Chinese by watching TV*
- Request for code review for IMemoryCache Generic Helper method
-
A note from our sponsor - SonarQube
www.sonarqube.org | 1 Jun 2023
Index
What are some of the best open-source Cache projects in C#? This list will help you:
Project | Stars | |
---|---|---|
1 | Akavache | 2,327 |
2 | CacheManager | 2,241 |
3 | EasyCaching | 1,614 |
4 | Lazy Cache | 1,575 |
5 | FFImageLoading - Fast & Furious Image Loading | 1,404 |
6 | SmartSql | 953 |
7 | FusionCache | 705 |
8 | StackExchange.Redis.Extensions | 557 |
9 | Cache Tower | 447 |
10 | BitFaster.Caching | 225 |
11 | Cashew | 82 |
12 | SqliteCache for ASP.NET Core | 56 |
13 | fast-cache | 25 |
14 | FastCache | 20 |
15 | OpenWeatherMap.Cache | 6 |