Git Product home page Git Product logo

distributedcachingsamplewithredis's Introduction

Distributed Caching With Redis

.Net Core 3.0, Redis, InMemoryCache, Utf8Json

Description

This project aims to create a caching library that uses distributed cache with inmemory cache

Features

Framework
  • .Net Core
Cachers
  • Redis
  • InMemoryCache

Requirements

  • .Net Core >= 3.0
  • Redis

Running the API

Development

To start the application in development mode, run:

dotnet build
cd src\DistributedCachingSampleWithRedis
dotnet run

Application will be served on route: http://localhost:5000

Caching Layers

  • If the key is in InMemory Cache then return the value
  • If the key is not in InMemory Cache then ask Redis to value
  • If the value has changed on Redis cache then publish a message to all subscribers to update inMemory Cache
  • If the key is not in InMemory nor Redis and there is no function delegate to fill values then return null
  • If the value is not in Redis Cache and there is a delegate function then execute external call to fill the value. Then update the redis and send a message to the all subscribers to update their values.When the subscribers got their values then update inmemory cache with that value

TODO List

  • Add tests
  • Add actual data source

distributedcachingsamplewithredis's People

Contributors

ozanerdogan90 avatar

Watchers

James Cloos avatar  avatar

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.