Remora.Discord.Caching 40.0.1

Prefix Reserved
dotnet add package Remora.Discord.Caching --version 40.0.1
                    
NuGet\Install-Package Remora.Discord.Caching -Version 40.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Remora.Discord.Caching" Version="40.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Remora.Discord.Caching" Version="40.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Remora.Discord.Caching" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Remora.Discord.Caching --version 40.0.1
                    
#r "nuget: Remora.Discord.Caching, 40.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Remora.Discord.Caching@40.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Remora.Discord.Caching&version=40.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Remora.Discord.Caching&version=40.0.1
                    
Install as a Cake Tool

Remora.Discord.Caching

This package contains cache functionality for the gateway and REST API, enabling replacement of the standard services with caching counterparts. These services attempt to retrieve entities from a cache provider whenever possible instead of performing a remote call to Discord's REST API, saving bandwidth and increasing performance.

A set of responders are also registered, enabling near real-time cache updates as new events come in.

Structure

The library defines a set of replacement services for the API services from Remora.Discord.Rest, which override the base implementation in order to perform cache operations before and after normal calls.

In addition, two responders - one in the early group, and one in the late - are also defined, which handle eviction and insertion of incoming objects.

Usage

Usage is simple, but with one caveat - caching must be enabled after the REST and gateway services have been added to the dependency injection container, as this library replaces services from them.

After that, it's as simple as calling the following method. By default, the caching system uses an in-memory cache provider.

services.AddDiscordCaching();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Remora.Discord.Caching:

Package Downloads
Remora.Discord

Metapackage for Remora.Discord's various components

Remora.Discord.Caching.Redis

Redis-based cache provider for Remora.Discord

VTP.Remora.Discord.HTTPInteractions

Adds support for receiving interactions over HTTP to Remora.Discord

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
40.0.1 25,721 5/24/2025
40.0.0 14,820 2/13/2025
39.0.0 46,327 5/28/2024
38.0.1 26,137 2/5/2024
38.0.0 13,953 11/14/2023
37.0.0 28,618 7/24/2023
36.0.0 17,899 5/11/2023
35.0.0 1,139 3/20/2023
34.0.2 1,551 1/19/2023
34.0.1 888 1/10/2023
34.0.0 1,246 12/28/2022
33.0.1 1,525 12/10/2022
33.0.0 1,335 10/30/2022
32.0.0 16,630 9/2/2022
31.0.0 1,333 8/19/2022
30.0.6 1,334 7/26/2022
30.0.5 1,175 7/26/2022
30.0.4 2,224 6/29/2022
30.0.3 1,181 6/27/2022
30.0.2 1,286 6/23/2022
Loading failed

Fix CacheService.TryGetPreviousValueAsync
           Handle IMessageUpdate in cache service