lucid-sharp 1.0.0

Install-Package lucid-sharp -Version 1.0.0
dotnet add package lucid-sharp --version 1.0.0
<PackageReference Include="lucid-sharp" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add lucid-sharp --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: lucid-sharp, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install lucid-sharp as a Cake Addin
#addin nuget:?package=lucid-sharp&version=1.0.0

// Install lucid-sharp as a Cake Tool
#tool nuget:?package=lucid-sharp&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

How to Use?

You simply need to add this lines to Startup.cs file:

public void ConfigureServices(IServiceCollection services)
{
    services.AddLucidCache(options =>
    {
        options.Configuration = "https://lucid-kv.herokuapp.com/";
        options.InstanceName = "LucidPublicNode";
    });

    services.AddControllers();
}

Consume it with dependency injection (DI)

public class HomeController : Controller
{
    private readonly IDistributedCache _distributedCache;

    public HomeController(IDistributedCache distributedCache)
    {
        _distributedCache = distributedCache;
    }

    public IActionResult Index()
    {
        // Store String
        // Hello World! is written in https://lucid-kv.herokuapp.com/api/kv/hello_world
        _distributedCache.SetString("hello_world", "Hello World!");        

        // Directly store an image
        _distributedCache.Set("hello_world", System.IO.File.ReadAllBytes("/tmp/profile_picture.jpg"));
        return View();
    }
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 407 3/26/2020