GithubHelp home page GithubHelp logo

nebula-software-systems / nebula.caching Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 333 KB

Make your dotnet core apps shine by using caching without cluttering your projects.

License: MIT License

C# 100.00%
caching csharp dotnet redis in-memory-caching inmemory inmemory-cache memcached

nebula.caching's Introduction

Nebula.Caching

Make use of caching without any hassle.

About

Nebula.Caching is an Open-Source caching library that allows you to use caching in your projects with minimal configuration.

As of today, we support caching using Redis, InMemory and Memcached, but in the future we hope to support your favourite caching provider!

Nuget Package

Name Released Package
NebulaCaching.Redis BotBuilder Badge
NebulaCaching.InMemory BotBuilder Badge
NebulaCaching.Memcached BotBuilder Badge

Usage

Step 1 : Install one of the available packages

Install the package via Package Manager:

Install-Package NebulaCaching.Redis
Install-Package NebulaCaching.InMemory
Install-Package NebulaCaching.Memcached

or

Via .NET CLI:

dotnet add package NebulaCaching.Redis
dotnet add package NebulaCaching.InMemory
dotnet add package NebulaCaching.Memcached

Step 2 : Register cache usage in the Program class (will change depending on which caching provider you are using, please refer to the package documentation)

public class Program
{
    public static void Main(string[] args)
    {
      // ...

      builder.Host.UseNebulaCaching();
      builder.Services.AddRedisChache(new RedisConfigurations
      {
        //some amazing configuration options which can be see in the samples or documentation section
      });
    }
}

Step 3 : Use the caching attribute in your interface definitions (will change depending on which caching provider you are using, please refer to the package documentation)

    public interface IRedisStuff
    {
        [RedisCache(CacheDurationInSeconds = 120)]
        List<SomeObject> SomeMethod(int param1, int param2);
    }

Documentation

Our documentation can be found here.

Samples

Some useful code snippets can be found here.

Roadmap

To check what we want to achieve in the future, please refer to our ROADMAP.

Contributing

This project welcomes and appreciates any contributions made.

There are several ways you can contribute, namely:

  • Report any bug found.
  • Suggest some features or improvements.
  • Creating pull requests.

License

Nebula.Caching is a free and open-source software licensed under the MIT License.

See LICENSE for more details.

nebula.caching's People

Contributors

rafaeljcamara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nebula.caching's Issues

Nice project. But my humble opinion is that the architecture of the project is a bit wrong.

Hi. I just saw your document on dev.to. I think it's a nice project. I hope it gets where you want it to go. However, in my humble opinion, the architecture of the project is a bit off. Currently, your project doesn't have any solution file and is a single project only built on Redis. You need to create a solution and split your project into several different ones.

For example, initially, you need two projects: Nebula.Caching.Core and Nebula.Caching.RedisCache:
Nebula Caching1

Nebula.Caching.Core: This is a core project where you have all of your interfaces and all caching system-independent DTOs. And the core mechanics.
Nebula.Caching.RedisCache: This is a project that contains all things related to Redis. Caching, key generations, etc. It has Nebula.Caching.Core reference and all necessary implementations of the interfaces that you defined in the core project.
So your core code will work independently of caching over interfaces.
Then you can release Nebula.Caching.RedisCache nuget package and users can use your library with redis.

After that, when you want to implement more libraries, caching systems you can easily implement them in your system by adding another project to your solution. The new caching systems will also just implement the caching stuff and all necessary interfaces comes from core project and your code will work with the new caching system.
For example:
Nebula Caching2
After that, users who want to use Redis can use the system by adding the Nebula.Caching.RedisCache NuGet package to their projects, and users who want to use in-memory cache can use the system by adding the Nebula.Caching.InMemory NuGet package to their projects.

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.