79
1
using System;
2
using System.Linq;
3
using System.Collections.Generic;
4
5
public class Program
6
{
7
public static void Main()
8
{
9
var productService = new ProductService();
10
productService.GetProducts();
11
12
Console.WriteLine("------");
13
14
var cacheProductService = new CacheProductService(new ProductService());
15
cacheProductService.GetProducts();
16
17
Console.WriteLine("------");
18
19
var logProductService = new LogProductService(new CacheProductService(new ProductService()));
20
logProductService.GetProducts();
21
}
22
}
23
24
public record Product;
Cached Result