Hi

I received some email asking for details about the TNXLocalCache or TNX.Cache.Redis nuget packages

Here a very short exampe of these micro packages able to let the developer access a memorycache or redis cache in a fluent way with only one code line. For any further query, please email to: info@antonioesposito.it

class Program
{
     static void Main(string[] args)
     {
         //enable some diagnostic output
         CacheManager.EmitsDebugTrace = true;
         RedisCacheManager.EmitsDebugTrace = true;
         RedisCacheManager.ConnectionString = “[yourdomain].redis.cache.windows.net:6380,password=[yourpwd],ssl=True,abortConnect=False,syncTimeout=3000”;

        while (true)
         {
             Console.WriteLine(
                 CacheManager.GetOrDrillShort(()=>
                     RedisCacheManager.GetOrDrillShort(RetrieveData, “RetrieveData”)
                 , “RetrieveData”)
             );

            Thread.Sleep(100);
         }
     }

    static string RetrieveData() => DateTime.Now.ToString(“s”);
}