{"id":19204356,"url":"https://github.com/jmbl1685/aspnet-core-net-6-api-cache","last_synced_at":"2026-05-13T13:46:06.838Z","repository":{"id":43462908,"uuid":"511327766","full_name":"jmbl1685/aspnet-core-net-6-api-cache","owner":"jmbl1685","description":"ASP.NET Core (.NET 6) Web API + cache (Redis, Memory)","archived":false,"fork":false,"pushed_at":"2022-07-29T23:53:23.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T14:42:11.507Z","etag":null,"topics":["aspnet-core","cache","cache-memory","net-6","redis","web-api"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmbl1685.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-07T00:02:05.000Z","updated_at":"2023-03-04T05:22:37.000Z","dependencies_parsed_at":"2022-08-23T14:31:11.720Z","dependency_job_id":null,"html_url":"https://github.com/jmbl1685/aspnet-core-net-6-api-cache","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Faspnet-core-net-6-api-cache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Faspnet-core-net-6-api-cache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Faspnet-core-net-6-api-cache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmbl1685%2Faspnet-core-net-6-api-cache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmbl1685","download_url":"https://codeload.github.com/jmbl1685/aspnet-core-net-6-api-cache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240275908,"owners_count":19775615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnet-core","cache","cache-memory","net-6","redis","web-api"],"created_at":"2024-11-09T13:07:33.167Z","updated_at":"2026-05-13T13:46:06.788Z","avatar_url":"https://github.com/jmbl1685.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASP.NET Core (.NET 6) Web API with cache\n\nTo run this project from Docker\n\n```sh\n$\u003e docker build -t aspnet-core-net-6-api-cache -f ./CacheSample.WebApi/Dockerfile .\n$\u003e docker create --name aspnet-core-net-6-api-cache-core aspnet-core-net-6-api-cache\n$\u003e docker start aspnet-core-net-6-api-cache-core\n$\u003e docker run --rm -p 3000:3000 aspnet-core-net-6-api-cache\n```\n\nSolution sample to (port is already allocated)\n```\nBind for 0.0.0.0:3000 failed: port is already allocated.\n\n$\u003e docker ps\n\nCONTAINER ID   IMAGE                         COMMAND                  CREATED          STATUS          PORTS                    NAMES\n69e65c95dfaf   aspnet-core-net-6-api-cache   \"dotnet CacheSample.…\"   35 seconds ago   Up 29 seconds                            aspnet-core-net-6-api-cache-core\n\n$\u003e docker stop 69e65c95dfaf\n\n$\u003e docker ps \n\nCONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES\n\n$\u003e docker run --rm -p 3000:3000 aspnet-core-net-6-api-cache\ninfo: Microsoft.Hosting.Lifetime[14]\n      Now listening on: http://[::]:3000\ninfo: Microsoft.Hosting.Lifetime[0]\n      Application started. Press Ctrl+C to shut down.\ninfo: Microsoft.Hosting.Lifetime[0]\n      Hosting environment: Production\ninfo: Microsoft.Hosting.Lifetime[0]\n      Content root path: /app/\n```\n\n#### Using Memory\n![image](https://user-images.githubusercontent.com/22874642/177662412-5d5e270c-09bf-4024-9a21-4df086c20e8b.png)\n\n#### Using Redis\n![image](https://user-images.githubusercontent.com/22874642/177662439-8d442cab-f901-4bac-91b9-b97533cc52db.png)\n\nYou can add your custom DB Provider (MongoDB, SQL Server, PostgreSQL, etc) and adapt it as necessary\n\nGo to the file \"appsettings.json\" (aspnet-core-net-6-api-cache/CacheSample.WebApi/appsettings.json) and replace your redis connection string\n\n```\n{\n  \"Logging\": {\n    \"LogLevel\": {\n      \"Default\": \"Information\",\n      \"Microsoft.AspNetCore\": \"Warning\"\n    }\n  },\n  \"AllowedHosts\": \"*\",\n  \"Redis\": {\n    \"ConnectionString\": \"your_host:your_port,password=your_password\"\n  }\n}\n```\n\n## Screenshots:\n![image](https://user-images.githubusercontent.com/22874642/177671596-38090778-d838-47ab-b077-1f5117640efe.png)\n\n![image](https://user-images.githubusercontent.com/22874642/177671712-501aca4b-b54c-4a22-8050-61c9ffe182de.png)\n\n## Result:\n\n![image](https://user-images.githubusercontent.com/22874642/177673086-e14a003b-7a99-47f0-bb29-4ff493f81617.png)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Faspnet-core-net-6-api-cache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmbl1685%2Faspnet-core-net-6-api-cache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmbl1685%2Faspnet-core-net-6-api-cache/lists"}