https://github.com/exentials/re-cache
Re-Cache is a dockerized in-memory cache key/values data store
https://github.com/exentials/re-cache
inmemory-cache
Last synced: 3 months ago
JSON representation
Re-Cache is a dockerized in-memory cache key/values data store
- Host: GitHub
- URL: https://github.com/exentials/re-cache
- Owner: exentials
- License: mit
- Created: 2022-12-13T19:49:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-03T05:42:33.000Z (about 1 year ago)
- Last Synced: 2025-07-22T07:10:30.659Z (9 months ago)
- Topics: inmemory-cache
- Language: C#
- Homepage:
- Size: 423 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
#
Exentials.ReCache
Re-Cache is a dockerized in-memory cache key/values data store, build on top of dotnet the client/server communication use the gRPC protocol to maximize performance.
The keys/values can be stored in different structure and can be grouped by a namespace, so you can use the same key with different value in a different group or in different structure of data.
Supported structures are `Set` and `HashSet`.
## HOW TO:
## Re-Cache Server
Re-Cache server is provided by a ready to run docker container:
```
docker run -p 443:443 -p 80:80 -d exentials/re-cache:latest
```
To change the default encription key and authentication account you could add the environment variables:
```
-e Auth__Secretkey=mysecretkey
-e Users__AdminUsername=my_admin_username
-e Users__AdminPassword=my_admin_password
-e Users__ClientUsername=my_client_username
-e Users__ClientPassword=my_client_passowrd
```
gRPC require a secure connection so the container use a self generated certificate.
To test the server use the provided [Re-Cache Cli](https://github.com/exentials/re-cache/releases) console application; the default password is `recachepwd`.
```
recli connect -p recachepwd
```
Re-Cache server expose also a web page, intentions are to provide a dashboard to show the cache statistics and allow the server administration.
The server implements also gRPC transcoding to OpenAPI endpoint.
Re-Cache server implements also an automatic backup/restore to recover stored data during the start process.
## Re-Cache Client
To implement client service communication in your application use the provided NUGET package library.
```
dotnet add package Exentials.ReCache.Client
```
Then add the client configuration programmatically
```csharp
builder.Services.AddReCacheClient(options =>
{
options.SslUrl = "https://localhost";
options.Token = "";
options.KeepAlive = true;
options.IgnoreSslCertificate = true; // to allow self generated certificate
});
```
or by the appsettings.json
```json
"ReCache": {
"SslUrl": "https://localhost",
"Token": "",
"KeepAlive": true,
"IgnoreSslCertificate": true
}
```
and then
```csharp
builder.Services.Configure(builder.Configuration.GetSection(ReCacheClientOptions.ReCache));
builder.Services.AddReCacheClient();
```
To retrieve the token use the server page and post username and password (default/recachepwd).
# TODO:
- Add a Queue structure
- Create `@exentials/re-cache-node` for NodeRed node communication.