Git Product home page Git Product logo

caching-mysql's People

Contributors

ankoskl avatar applenele avatar chaosengine avatar dependabot-preview[bot] avatar dropsonic avatar justusgreiberorgadata avatar ronsijm avatar yukozh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

caching-mysql's Issues

SetAsync ignoring DefaultSlidingExpiration set in MySqlCacheOptions

using Pomelo.Extensions.Caching.MySql version 2.1.3

DI:

services.AddDistributedMySqlCache(opts =>
            {
                opts.ConnectionString = config.GetConnectionString("DistributedCache");
                opts.SchemaName = "DistributedCache";
                opts.TableName = "ApiCache";
                opts.DefaultSlidingExpiration = TimeSpan.FromMinutes(10);
            });

Usage:

_cache.Set(  "my_key", Encoding.UTF8.GetBytes("my_value") );

Error:

System.InvalidOperationException: Either absolute or sliding expiration needs to be provided.
   at Pomelo.Extensions.Caching.MySql.DatabaseOperations.ValidateOptions(Nullable`1 slidingExpiration, Nullable`1 absoluteExpiration)
   at Pomelo.Extensions.Caching.MySql.DatabaseOperations.SetCacheItem(String key, Byte[] value, DistributedCacheEntryOptions options)
   at Pomelo.Extensions.Caching.MySql.MySqlCache.Set(String key, Byte[] value, DistributedCacheEntryOptions options)
   at Microsoft.Extensions.Caching.Distributed.DistributedCacheExtensions.Set(IDistributedCache cache, String key, Byte[] value)

Expectation: If DistributedCacheEntryOptions.SlidingExpiration is not specified, the Set should use the DefaultSlidingExpiration as set in the AddDistributedMySqlCache options.

Strong name Pomelo.Extensions.Caching.MySql.dll

Can we please have Pomelo.Extensions.Caching.MySql.dll strong named?

This will fix the warning I am receiving when compiling a strong named project, referencing this package:

Warning CS8002 Referenced assembly 'Pomelo.Extensions.Caching.MySql, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' does not have a strong name.

.NET Standard 2.0

Is it possible to support multiple TargetFrameworks?
It would be great if Pomelo.Extensions.Caching.MySql targeted .NET Standard 2.0 as well.
We are currently using Pomelo.Extensions.Caching.MySql version 2.0.3 with .NET Framework 4.8, and we need the latest version of MySqlConnector, but unfortunately we cannot just update it due to their breaking changes in version 1.0.0,
and we cannot update Pomelo.Extensions.Caching.MySql because now it targets .net standard 2.1

Convert to netstandard 2.1

Given the dotnet core 3.1 is the new Long term supported framework (LTS) consider changing to netcoreapp3.1 and netstandard2.1 respectively for *.csproj

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.