├── README.MD ├── Decorator ├── Stores │ ├── ICarStore.cs │ ├── CarStore.cs │ └── Caching │ │ ├── CarCachingStore.cs │ │ └── CarCachingDecorator.cs ├── appsettings.Development.json ├── appsettings.json ├── Models │ ├── Car.cs │ └── CarDto.cs ├── Properties │ └── launchSettings.json ├── Controllers │ └── CarController.cs ├── Dockerfile ├── Program.cs ├── Decorator.csproj └── Startup.cs ├── .dockerignore ├── DecoratorDemo.sln └── .gitignore /README.MD: -------------------------------------------------------------------------------- 1 | # Decorator Pattern - Using ASP.NET DI and Scruptor 2 | 3 | Decorator demo -------------------------------------------------------------------------------- /Decorator/Stores/ICarStore.cs: -------------------------------------------------------------------------------- 1 | using Decorator.Models; 2 | 3 | namespace Decorator.Stores 4 | { 5 | public interface ICarStore 6 | { 7 | CarDto List(); 8 | CarDto Get(int id); 9 | } 10 | } -------------------------------------------------------------------------------- /Decorator/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Decorator/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /Decorator/Models/Car.cs: -------------------------------------------------------------------------------- 1 | namespace Decorator.Models 2 | { 3 | public class Car 4 | { 5 | public int Id { get; set; } 6 | public string Model { get; set; } 7 | public string Brand { get; set; } 8 | public int Year { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.dockerignore 3 | **/.env 4 | **/.git 5 | **/.gitignore 6 | **/.project 7 | **/.settings 8 | **/.toolstarget 9 | **/.vs 10 | **/.vscode 11 | **/*.*proj.user 12 | **/*.dbmdl 13 | **/*.jfm 14 | **/azds.yaml 15 | **/bin 16 | **/charts 17 | **/docker-compose* 18 | **/Dockerfile* 19 | **/node_modules 20 | **/npm-debug.log 21 | **/obj 22 | **/secrets.dev.yaml 23 | **/values.dev.yaml 24 | LICENSE 25 | README.md -------------------------------------------------------------------------------- /Decorator/Models/CarDto.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | 4 | namespace Decorator.Models 5 | { 6 | public class CarDto 7 | { 8 | public List Cars { get; set; } 9 | public string From { get; set; } 10 | 11 | public CarDto(string from, params Car[] cars) 12 | { 13 | Cars = cars.ToList(); 14 | From = from; 15 | } 16 | 17 | public void FromMemory() 18 | { 19 | From = "Memory Cache"; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Decorator/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:4217", 7 | "sslPort": 44325 8 | } 9 | }, 10 | "$schema": "http://json.schemastore.org/launchsettings.json", 11 | "profiles": { 12 | 13 | "Decorator": { 14 | "commandName": "Project", 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "environmentVariables": { 18 | "ASPNETCORE_ENVIRONMENT": "Development" 19 | }, 20 | "applicationUrl": "https://localhost:5001;http://localhost:5000" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Decorator/Controllers/CarController.cs: -------------------------------------------------------------------------------- 1 | using Decorator.Stores; 2 | using Microsoft.AspNetCore.Mvc; 3 | 4 | namespace Decorator.Controllers 5 | { 6 | [ApiController] 7 | [Route("cars")] 8 | public class CarController : ControllerBase 9 | { 10 | private readonly ICarStore _store; 11 | 12 | public CarController(ICarStore store) 13 | { 14 | _store = store; 15 | } 16 | 17 | [HttpGet] 18 | public IActionResult Get() 19 | { 20 | return Ok(_store.List()); 21 | } 22 | 23 | [HttpGet("{id}")] 24 | public IActionResult Get(int id) 25 | { 26 | return Ok(_store.Get(id)); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Decorator/Dockerfile: -------------------------------------------------------------------------------- 1 | #See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. 2 | 3 | FROM mcr.microsoft.com/dotnet/core/aspnet:5.0-buster-slim AS base 4 | WORKDIR /app 5 | EXPOSE 80 6 | EXPOSE 443 7 | 8 | FROM mcr.microsoft.com/dotnet/core/sdk:5.0-buster AS build 9 | WORKDIR /src 10 | COPY ["CacheStrategy/CacheStrategy.csproj", "CacheStrategy/"] 11 | RUN dotnet restore "CacheStrategy/CacheStrategy.csproj" 12 | COPY . . 13 | WORKDIR "/src/CacheStrategy" 14 | RUN dotnet build "CacheStrategy.csproj" -c Release -o /app/build 15 | 16 | FROM build AS publish 17 | RUN dotnet publish "CacheStrategy.csproj" -c Release -o /app/publish 18 | 19 | FROM base AS final 20 | WORKDIR /app 21 | COPY --from=publish /app/publish . 22 | ENTRYPOINT ["dotnet", "CacheStrategy.dll"] -------------------------------------------------------------------------------- /Decorator/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | using Microsoft.Extensions.Logging; 4 | 5 | namespace Decorator 6 | { 7 | public class Program 8 | { 9 | public static void Main(string[] args) 10 | { 11 | CreateHostBuilder(args).Build().Run(); 12 | } 13 | 14 | public static IHostBuilder CreateHostBuilder(string[] args) => 15 | Host.CreateDefaultBuilder(args) 16 | .ConfigureLogging(logging => 17 | { 18 | logging.ClearProviders(); 19 | logging.AddConsole(); 20 | }) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Decorator/Decorator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | f84c24d9-3def-41f8-83da-60bba439fece 6 | Linux 7 | 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Decorator/Stores/CarStore.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Bogus; 4 | using Decorator.Models; 5 | 6 | namespace Decorator.Stores 7 | { 8 | public class CarStore : ICarStore 9 | { 10 | public List CarStorage { get; set; } 11 | 12 | public CarStore() 13 | { 14 | var id = 0; 15 | var testOrders = new Faker() 16 | .RuleFor(o => o.Id, f => ++id) 17 | .RuleFor(o => o.Year, f => f.Random.Int(1950, 2020)) 18 | .RuleFor(o => o.Brand, f => f.Vehicle.Manufacturer()) 19 | .RuleFor(o => o.Model, f => f.Vehicle.Model()); 20 | CarStorage = testOrders.Generate(10); 21 | } 22 | 23 | public CarDto List() 24 | { 25 | return new CarDto("Database", CarStorage.ToArray()); 26 | } 27 | 28 | public CarDto Get(int userid) 29 | { 30 | return new CarDto("Database", CarStorage.FirstOrDefault(f => f.Id == userid)); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /DecoratorDemo.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30114.105 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Decorator", "Decorator\Decorator.csproj", "{5D0D63B5-04CD-4C84-8485-892719294471}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {5D0D63B5-04CD-4C84-8485-892719294471}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {5D0D63B5-04CD-4C84-8485-892719294471}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {5D0D63B5-04CD-4C84-8485-892719294471}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {5D0D63B5-04CD-4C84-8485-892719294471}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {806B2634-ED92-42A3-83EF-62CE601A06A7} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Decorator/Stores/Caching/CarCachingStore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Decorator.Models; 3 | using Microsoft.Extensions.Caching.Memory; 4 | using Microsoft.Extensions.Logging; 5 | 6 | namespace Decorator.Stores.Caching 7 | { 8 | public class CarCachingStore : ICarStore 9 | { 10 | private readonly IMemoryCache _memoryCache; 11 | private readonly ICarStore _inner; 12 | private readonly ILogger _logger; 13 | 14 | public CarCachingStore(IMemoryCache memoryCache, ICarStore inner, ILogger logger) 15 | { 16 | _memoryCache = memoryCache; 17 | _inner = inner; 18 | _logger = logger; 19 | } 20 | public CarDto List() 21 | { 22 | var key = "Cars"; 23 | var items = _memoryCache.Get(key); 24 | if (items == null) 25 | { 26 | items = _inner.List(); 27 | _logger.LogTrace("Cache miss for {CacheKey}", key); 28 | if (items != null) 29 | { 30 | _logger.LogTrace("Setting items in cache for {CacheKey}", key); 31 | _memoryCache.Set(key, items, TimeSpan.FromMinutes(1)); 32 | } 33 | } 34 | else 35 | { 36 | items.FromMemory(); 37 | _logger.LogTrace("Cache hit for {CacheKey}", key); 38 | } 39 | 40 | return items; 41 | } 42 | 43 | public CarDto Get(int id) 44 | { 45 | var key = $"Cars:{id}"; 46 | var items = _memoryCache.Get(key); 47 | if (items == null) 48 | { 49 | items = _inner.Get(id); 50 | _logger.LogTrace("Cache miss for {CacheKey}", key); 51 | if (items != null) 52 | { 53 | _logger.LogTrace("Setting items in cache for {CacheKey}", key); 54 | _memoryCache.Set(key, items, TimeSpan.FromMinutes(1)); 55 | } 56 | } 57 | else 58 | { 59 | items.FromMemory(); 60 | _logger.LogTrace("Cache hit for {CacheKey}", key); 61 | } 62 | 63 | return items; 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /Decorator/Stores/Caching/CarCachingDecorator.cs: -------------------------------------------------------------------------------- 1 | using Decorator.Models; 2 | using Microsoft.Extensions.Caching.Memory; 3 | using Microsoft.Extensions.Logging; 4 | using System; 5 | 6 | namespace Decorator.Stores.Caching 7 | { 8 | public class CarCachingDecorator : ICarStore 9 | where T : ICarStore 10 | { 11 | private readonly IMemoryCache _memoryCache; 12 | private readonly T _inner; 13 | private readonly ILogger> _logger; 14 | 15 | public CarCachingDecorator(IMemoryCache memoryCache, T inner, ILogger> logger) 16 | { 17 | _memoryCache = memoryCache; 18 | _inner = inner; 19 | _logger = logger; 20 | } 21 | public CarDto List() 22 | { 23 | var key = "Cars"; 24 | var items = _memoryCache.Get(key); 25 | if (items == null) 26 | { 27 | items = _inner.List(); 28 | _logger.LogTrace("Cache miss for {CacheKey}", key); 29 | if (items != null) 30 | { 31 | _logger.LogTrace("Setting items in cache for {CacheKey}", key); 32 | _memoryCache.Set(key, items, TimeSpan.FromMinutes(1)); 33 | } 34 | } 35 | else 36 | { 37 | items.FromMemory(); 38 | _logger.LogTrace("Cache hit for {CacheKey}", key); 39 | } 40 | 41 | return items; 42 | } 43 | 44 | public CarDto Get(int id) 45 | { 46 | var key = $"Cars:{id}"; 47 | var items = _memoryCache.Get(key); 48 | if (items == null) 49 | { 50 | items = _inner.Get(id); 51 | _logger.LogTrace("Cache miss for {CacheKey}", key); 52 | if (items != null) 53 | { 54 | _logger.LogTrace("Setting items in cache for {CacheKey}", key); 55 | _memoryCache.Set(key, items, TimeSpan.FromMinutes(1)); 56 | } 57 | } 58 | else 59 | { 60 | items.FromMemory(); 61 | _logger.LogTrace("Cache hit for {CacheKey}", key); 62 | } 63 | 64 | return items; 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Decorator/Startup.cs: -------------------------------------------------------------------------------- 1 | using Decorator.Stores; 2 | using Decorator.Stores.Caching; 3 | using Microsoft.AspNetCore.Builder; 4 | using Microsoft.AspNetCore.Hosting; 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.OpenApi.Models; 9 | using System; 10 | 11 | namespace Decorator 12 | { 13 | public class Startup 14 | { 15 | public Startup(IConfiguration configuration) 16 | { 17 | Configuration = configuration; 18 | } 19 | 20 | public IConfiguration Configuration { get; } 21 | 22 | // This method gets called by the runtime. Use this method to add services to the container. 23 | public void ConfigureServices(IServiceCollection services) 24 | { 25 | services.AddControllers(); 26 | services.AddMemoryCache(); 27 | services.AddSwaggerGen(options => 28 | { 29 | options.SwaggerDoc("v1", new OpenApiInfo() 30 | { 31 | Version = "v1", 32 | Title = "Cache Strategy", 33 | Description = "Swagger surface", 34 | Contact = new OpenApiContact() 35 | { 36 | Name = "Bruno Brito", 37 | Email = "bhdebrito@gmail.com", 38 | Url = new Uri("https://www.brunobrito.net.br") 39 | }, 40 | License = new OpenApiLicense() 41 | { 42 | Name = "MIT", 43 | Url = new Uri("https://github.com/brunohbrito/RESTFul.API-Example/blob/master/LICENSE") 44 | }, 45 | 46 | }); 47 | 48 | }); 49 | RegisterServices(services); 50 | EnableDecorator(services); 51 | } 52 | 53 | private void EnableDecorator(IServiceCollection services) 54 | { 55 | services.Decorate(); 56 | } 57 | 58 | private static void RegisterServices(IServiceCollection services) 59 | { 60 | services.AddScoped(); 61 | } 62 | 63 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 64 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 65 | { 66 | if (env.IsDevelopment()) 67 | { 68 | app.UseDeveloperExceptionPage(); 69 | } 70 | 71 | app.UseHttpsRedirection(); 72 | 73 | app.UseRouting(); 74 | 75 | app.UseAuthorization(); 76 | app.UseSwagger(); 77 | app.UseSwaggerUI(c => 78 | { 79 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "Cache Strategy"); 80 | }); 81 | app.UseEndpoints(endpoints => 82 | { 83 | endpoints.MapControllers(); 84 | }); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | 11 | # User-specific files (MonoDevelop/Xamarin Studio) 12 | *.userprefs 13 | 14 | # Build results 15 | [Dd]ebug/ 16 | [Dd]ebugPublic/ 17 | [Rr]elease/ 18 | [Rr]eleases/ 19 | [Xx]64/ 20 | [Xx]86/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | [Dd]ist/ 25 | 26 | # Visual Studio 2015 cache/options directory 27 | .vs/ 28 | .sonarqube/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Vs publish files 33 | *.pubxml 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | coverage.opencover.xml 43 | 44 | # Build Results of an ATL Project 45 | [Dd]ebugPS/ 46 | [Rr]eleasePS/ 47 | dlldata.c 48 | 49 | # DNX 50 | project.lock.json 51 | artifacts/ 52 | 53 | *_i.c 54 | *_p.c 55 | *_i.h 56 | *.ilk 57 | *.meta 58 | *.obj 59 | *.pch 60 | *.pdb 61 | *.pgc 62 | *.pgd 63 | *.rsp 64 | *.sbr 65 | *.tlb 66 | *.tli 67 | *.tlh 68 | *.tmp 69 | *.tmp_proj 70 | *.log 71 | *.vspscc 72 | *.vssscc 73 | .builds 74 | *.pidb 75 | *.svclog 76 | *.scc 77 | 78 | # Chutzpah Test files 79 | _Chutzpah* 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opendb 86 | *.opensdf 87 | *.sdf 88 | *.cachefile 89 | *.VC.db 90 | 91 | # Visual Studio profiler 92 | *.psess 93 | *.vsp 94 | *.vspx 95 | *.sap 96 | 97 | # TFS 2012 Local Workspace 98 | $tf/ 99 | 100 | # Guidance Automation Toolkit 101 | *.gpState 102 | 103 | # ReSharper is a .NET coding add-in 104 | _ReSharper*/ 105 | *.[Rr]e[Ss]harper 106 | *.DotSettings.user 107 | 108 | # JustCode is a .NET coding add-in 109 | .JustCode 110 | 111 | # TeamCity is a build add-in 112 | _TeamCity* 113 | 114 | # DotCover is a Code Coverage Tool 115 | *.dotCover 116 | 117 | # NCrunch 118 | _NCrunch_* 119 | .*crunch*.local.xml 120 | nCrunchTemp_* 121 | 122 | # MightyMoose 123 | *.mm.* 124 | AutoTest.Net/ 125 | 126 | # Web workbench (sass) 127 | .sass-cache/ 128 | 129 | # Installshield output folder 130 | [Ee]xpress/ 131 | 132 | # DocProject is a documentation generator add-in 133 | DocProject/buildhelp/ 134 | DocProject/Help/*.HxT 135 | DocProject/Help/*.HxC 136 | DocProject/Help/*.hhc 137 | DocProject/Help/*.hhk 138 | DocProject/Help/*.hhp 139 | DocProject/Help/Html2 140 | DocProject/Help/html 141 | 142 | # Click-Once directory 143 | publish/ 144 | 145 | # Publish Web Output 146 | *.[Pp]ublish.xml 147 | *.azurePubxml 148 | 149 | # TODO: Un-comment the next line if you do not want to checkin 150 | # your web deploy settings because they may include unencrypted 151 | # passwords 152 | #*.pubxml 153 | *.publishproj 154 | 155 | # NuGet Packages 156 | *.nupkg 157 | # The packages folder can be ignored because of Package Restore 158 | **/packages/* 159 | # except build/, which is used as an MSBuild target. 160 | !**/packages/build/ 161 | # Uncomment if necessary however generally it will be regenerated when needed 162 | #!**/packages/repositories.config 163 | # NuGet v3's project.json files produces more ignoreable files 164 | *.nuget.props 165 | *.nuget.targets 166 | 167 | # Microsoft Azure Build Output 168 | csx/ 169 | *.build.csdef 170 | 171 | # Microsoft Azure Emulator 172 | ecf/ 173 | rcf/ 174 | 175 | # Windows Store app package directory 176 | AppPackages/ 177 | BundleArtifacts/ 178 | 179 | # Visual Studio cache files 180 | # files ending in .cache can be ignored 181 | *.[Cc]ache 182 | # but keep track of directories ending in .cache 183 | !*.[Cc]ache/ 184 | 185 | # Others 186 | ClientBin/ 187 | [Ss]tyle[Cc]op.* 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.pfx 193 | *.publishsettings 194 | node_modules/ 195 | orleans.codegen.cs 196 | 197 | # RIA/Silverlight projects 198 | Generated_Code/ 199 | 200 | # Backup & report files from converting an old project file 201 | # to a newer Visual Studio version. Backup files are not needed, 202 | # because we have git ;-) 203 | _UpgradeReport_Files/ 204 | Backup*/ 205 | UpgradeLog*.XML 206 | UpgradeLog*.htm 207 | 208 | # SQL Server files 209 | *.mdf 210 | *.ldf 211 | 212 | # Business Intelligence projects 213 | *.rdl.data 214 | *.bim.layout 215 | *.bim_*.settings 216 | 217 | # Microsoft Fakes 218 | FakesAssemblies/ 219 | 220 | # GhostDoc plugin setting file 221 | *.GhostDoc.xml 222 | 223 | # Node.js Tools for Visual Studio 224 | .ntvs_analysis.dat 225 | 226 | # Visual Studio 6 build log 227 | *.plg 228 | 229 | # Visual Studio 6 workspace options file 230 | *.opt 231 | 232 | # Visual Studio LightSwitch build output 233 | **/*.HTMLClient/GeneratedArtifacts 234 | **/*.DesktopClient/GeneratedArtifacts 235 | **/*.DesktopClient/ModelManifest.xml 236 | **/*.Server/GeneratedArtifacts 237 | **/*.Server/ModelManifest.xml 238 | _Pvt_Extensions 239 | 240 | # LightSwitch generated files 241 | GeneratedArtifacts/ 242 | ModelManifest.xml 243 | 244 | # Paket dependency manager 245 | .paket/paket.exe 246 | 247 | # FAKE - F# Make 248 | .fake/ 249 | 250 | # Sphinx 251 | *.opt 252 | docs/_build 253 | docs/.vscode 254 | 255 | # Log files 256 | **/*log*.txt 257 | *.db --------------------------------------------------------------------------------