frends Community Task for Redis.
You can install the Task via frends UI Task View or you can find the NuGet package from the following NuGet feed https://www.myget.org/F/frends-community/api/v3/index.json and in Gallery view in MyGet https://www.myget.org/feed/frends-community/package/nuget/Frends.Community.Redis
A task for adding and updating key-value pairs or Sets to Redis.
Property | Type | Description | Example |
---|---|---|---|
ObjectType | Enum<KeyValuePair, Set> |
Choose the type how values are stored to Redis. | KeyValuePair |
KeyValuePairInput | Array of KeyValuePairInput |
Pairs to be stored in Redis. | See below |
SetInput | Array of SetInput |
Sets to be stored in Redis. | See below |
Property | Type | Description | Example |
---|---|---|---|
Key | object |
The chosen key for the key-value pair. | myvalues |
Value | object |
An object containing the values to be stored. | "[{\"id\":201,\"name\":\"SkiBussi 1 GPS\",\"direction\":-1,\"geolocation\":{\"lat\":67.8045555581415,\"lon\":24.8096944500295},\"route\":2}]" |
TimeToLive | TimeSpan |
TimeToLive limit for the value. | |
ValueExists | Enum<InsertAlways, InsertOnlyIfValueExists, InsertOnlyIfValueDoesNotExist> |
What to do when value exists. | InsertAlways |
Property | Type | Description | Example |
---|---|---|---|
Key | object |
The chosen key for the set of values. | myvalues |
Value | Array of object |
An array of values to be stored. | "[{\"id\":201,\"name\":\"SkiBussi 1 GPS\",\"direction\":-1,\"geolocation\":{\"lat\":67.8045555581415,\"lon\":24.8096944500295},\"route\":2}]" |
Property | Type | Description | Example |
---|---|---|---|
ConnectionString | string |
The connection string to Redis db. | contoso5.redis.cache.windows.net,ssl=true,password=password |
Timeout | int |
Timeout threshold for the connection in seconds. | 60 |
UseCachedConnection | bool |
Use cached connection for the task? | true |
Property | Type | Description | Example |
---|---|---|---|
Workers | int |
The minimum number of worker threads to be used. Only applied if larger than default. | 3 |
InputOutputCompletionPorts | int |
The minimum number of asynchronous I/O completion threads to be used. Only applied if larger than default. | 6 |
For each key-value pair or set, the task returns a list of result objects with following properties:
Property | Type | Description | Example |
---|---|---|---|
Success | bool |
Tells whether or not the insert succeeded. | true |
Value | object |
Key for the object that was to be inserted to db. | myvalues |
ToJToken() | JToken |
Returns the value of Value as JToken. |
A task for getting stored data from Redis.
Property | Type | Description | Example |
---|---|---|---|
ObjectType | Enum<KeyValuePair, Set> |
Choose the type how values are stored in Redis. | KeyValuePair |
Key | object[] |
Array of keys for key-value pairs to fetch. | ["myvalue"] |
SetKey | object |
The key for the set to fetch. | "myvalue" |
For connections settings, see Connection
For other settings, see Options
Task returns an object with following properties
Property | Type | Description | Example |
---|---|---|---|
Values | List<object> |
List of result objects. | |
ToJToken() | JToken |
Returns the value of Values as JToken. |
A task for removing wanted data from Redis.
Property | Type | Description | Example |
---|---|---|---|
ObjectType | Enum<KeyValuePair, Set> |
Choose the type how values are stored in Redis. | KeyValuePair |
Key | object[] |
Array of keys for key-value pairs to fetch. | ["myvalue"] |
SetInput | SetInput |
Set values to be removed. For more info, see SetInput. | "" |
For connections settings, see Connection
For other settings, see Options
For each key-value pair or set, the task returns a list of result objects with following properties:
Property | Type | Description | Example |
---|---|---|---|
Success | bool |
Tells whether or not the deletion succeeded. | true |
Value | object |
The number of removed objects. | 10 |
ToJToken() | JToken |
Returns the value of Value as JToken. |
A task for executing commands on Redis.
Property | Type | Description | Example |
---|---|---|---|
Command | string |
The command to be executed. | PING |
Parameters | object[] |
The array of parameters for the command. | ["useless_param"] |
For connections settings, see Connection
For other settings, see Options
Task returns IEnumerable<string>
that contains the results of the command.
Clone a copy of the repository
git clone https://github.com/CommunityHiQ/Frends.Community.Redis.git
Rebuild the project
dotnet build
Run tests
dotnet test
Create a NuGet package
dotnet pack --configuration Release
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
- Fork the repository on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
Version | Changes |
---|---|
1.0.1 | Initial overhaul from custom task to Community task. Added option settings for thread min values. Added remark about unit tests. |
1.0.2 | Renamed the property for IOCs. |
1.0.3 | ToJToken() added to result objects. |
1.0.4 | Downgraded Newtonsoft.Json to 12.0.0.0 |