FluentCache icon indicating copy to clipboard operation
FluentCache copied to clipboard

Example what to pass as instance and configuration parameters for Redis

Open george-weare8 opened this issue 6 years ago • 1 comments

I can't seem to find how to use Redis implementation, I searched the repo and it seems in one of your tests you have an absolute directory path retrieving the config from a json file

https://github.com/cordialgerm/FluentCache/blob/master/FluentCache.Test/Implementations/RedisCacheTests.cs#L24

Any example how to create an ICache using Redis implementation?

george-weare8 avatar Sep 02 '19 00:09 george-weare8

@george-weare8 it was a struggle for me at first as well, but managed to find out a way:

`var connectionString = $"{RedisCacheHost}:{RedisCachePort},password={RedisCachePassword},ssl={RedisCacheUseSSL},abortConnect=False,defaultDatabase={RedisCacheDb},connectTimeout={RedisConnectTimeoutInMs},connectRetry={RedisConnectRetry}"

ICache cache = new FluentRedisCache(RedisCacheHost, connectionString);`

Hope this helps.

Amila17 avatar Jan 11 '20 15:01 Amila17