GithubHelp home page GithubHelp logo

gegaryfa / repositorypatternwithautorefreshcache Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 349 KB

.Net Core API - Repository pattern with auto refresh cache

License: MIT License

Makefile 7.23% C# 88.46% Dockerfile 3.71% Shell 0.60%
netcore3 netcoreapi hangfire docker makefile repository-pattern cache ddd-architecture onion-architecture hangfire-dotnet-core mediatr

repositorypatternwithautorefreshcache's Introduction

Repository Pattern With Auto-Refresh Cache

license GitHub stars

.Net Core API - Repository pattern with auto refresh cache. This is a simple API using the repository design pattern to get data from a database. The data from the database are being cached either InMemory or in Redis(for scaled systems).

Getting Started

Clone the repo, open a terminal and run make to see all the possible actions. makefile

The project setup is based on Domain Driven Design: makefile

Prerequisites

Installing

I created a makefile to make it as easy as possible to get the docker containers up and runnig ๐Ÿ˜Ž. The only thing you need to do is run:

make up

After that you need to wait for the project to build and you are all set! The make command will run the docker-compose file and download all the images required for the porject. This will take some time so be patient โ˜•. When the make up command is finished, you should have 3 containers running:

  • The web API @: http://localhost:8000/
  • A SQL server with some dummy data already seeded in a database.
  • A redis cache which is being used when you set redis as the cache provider.

Alternatively, you can run the RepositoryWithCaching.WebApi project which will use In-memory(by default) data instead of a database on a sql server.

Built With

Sources

A good read on distributed caching for .Net Core: Distributed caching in ASP.NET Core.

Authors

  • George Garyfallou - Initial work - gegaryfa

Acknowledgments

  • Hat tip to anyone whose code was used

repositorypatternwithautorefreshcache's People

Contributors

gegaryfa avatar

Stargazers

 avatar

Watchers

 avatar

repositorypatternwithautorefreshcache's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.