Ejemplo n.º 1
0
    public Program(string[] args)
    {
        Console.Title = "Caching in C# - Sample"

                        var token = new Token("this is my token key to access cache on memory and its unique");
        var rnd = new Random();

        for (var i = 0; i < 10;)
        {
            token.AddEntry(rnd.NextDouble().ToString(), DateTime.Now.AddSeconds(5 + i * 2));
        }

        token.GetEntries().Select(entry => System.Console.WriteLine($"Entry value is '{entry}'."); );