GithubHelp home page GithubHelp logo

Comments (7)

fredericDelaporte avatar fredericDelaporte commented on August 30, 2024 1

I have frequently seen people using SysCache2 instead of SysCache, believing SysCache2 was a later version of it. It is not the case. Granted, the naming is misleading. SysCache2 is SysCache with Sql Server dependencies, allowing it to be invalidated by events occurring on db-side. If you are not using this feature, you can use any equivalent of SysCache, which is a memory based cache.

See the documentation.

It lags a bit, RtMemoryCache is now available for .Net Core too despite what is written in the documentation. And for a pure memory cache, RtMemoryCache would be my personal choice.

from nhibernate-caches.

Stumblor avatar Stumblor commented on August 30, 2024 1

@fredericDelaporte we are using syscache2 for the sql cache dependency functionality, as we have multiple apps interacting with the same database that need to inform each other of changes.

Do any of the new .netcore caching options support this feature?

from nhibernate-caches.

maca88 avatar maca88 commented on August 30, 2024

NHibernate.Caches.SysCache2 does not support .NET Core, because System.Web.Caching was not ported. You will have to switch to one of the following caches:

  • NHibernate.Caches.CoreMemoryCache
  • NHibernate.Caches.CoreDistributedCache.Memcached
  • NHibernate.Caches.CoreDistributedCache.Redis
  • NHibernate.Caches.CoreDistributedCache.SqlServer
  • NHibernate.Caches.StackExchangeRedis
  • NHibernate.Caches.RtMemoryCache

The closest to SysCache2 cache is NHibernate.Caches.CoreDistributedCache.SqlServer, you can try to use it instead.

from nhibernate-caches.

nambir avatar nambir commented on August 30, 2024

Hi Could you have any link which has the sample code for implementing 1.'NHibernate.Caches.CoreDistributedCache.SqlServer"
2.NHibernate.Caches.CoreMemoryCache

from nhibernate-caches.

maca88 avatar maca88 commented on August 30, 2024

You can check how the tests are configured:

  1. SqlServer
  2. CoreMemoryCache

from nhibernate-caches.

fredericDelaporte avatar fredericDelaporte commented on August 30, 2024

Currently, no. I do not believe the underlying .Net Framework functionalities required for syscache2 have been ported to .Net Core. It was not the case in 2019, as stated here.

If they are available in .Net Core, you may PR an update to SysCache2 for supporting .Net Core, if doable through an update. Otherwise if it is available in .Net Core but through something too different for an update, you may contribute a new cache provider (preferably better named).

from nhibernate-caches.

fredericDelaporte avatar fredericDelaporte commented on August 30, 2024

Searching a bit the subject again, it seems syscache2 required dependency will not be ported to .Net Core, so syscache2 will remain a .Net Framework only library.

But some other functionalities like SqlDependency (available as a Platform extension) may allow to create a new provider similar to syscache2, perhaps named SqlDependencyCache by example. It would have to replace the System.Web.Caching by a pure memory cache like System.Runtime.Caching then use SqlDependency to handle the SQL Server dependencies.

from nhibernate-caches.

Related Issues (20)

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.