Comments (6)
Almost forgotten to write: I think ".Abstractions" do not require Microsoft.Extensions.Caching.Memory
but rather 'Microsoft.Extensions.Caching.Abstractions' - this however needs further verification.
from fusioncache.
I always use namespaces without ".Abstractions" (by adding RootNamespace
to csproj). As far as I know this is what Microsoft does in all packages. Also it seems inconvenient to have ".Abstractions" added everywhere (at least for me), and I don't see any benefits of ".Abstractions" in namespaces.
from fusioncache.
Hi @adambajguz ,
I observed the pattern of separating core interfaces and common classes in an "abstractions" package in the wild, but all the times it was because the main package had a lot of other sub-dependencies.
In the case of FusionCache though, the main package only depends on 2 other packages which are Microsoft.Extensions.Caching.Memory
(for the memory cache) and System.Threading.Tasks.Extensions
(for ValueTask
s): both of those dependencies would be there in the "abstractions" package nonetheless, since the related types are used directly in the public API surface area, so I don't know what would be gained by this split (in this specific case at least).
Can you elaborate more about why you think this would useful? I'm interested in understanding more.
Anyway I'm certainly open to the change if there's a real advantage.
Thanks!
from fusioncache.
Hi @jodydonetti,
I think the main idea of ".Abstractions" package is to provide contracts/API (that are considered most stable, independent, and universal). The case, where we need ".Abstractions" package to provide multiple different implementations of IFusionCache
, is probably not valid here (unless you would like to introduce ICache
and build a new caching API standard).
However ".Abstractions" may result in easier/better compatibility for plugins etc. It is less likely for ".Abstractions" to have breaking changes in existing API, so even updating major versions should be easier, e.g. old plugin is guaranteed/more likely to work properly with newer version.
Also having ".Abstractions" package means concrete implementation and usable interfaces are separated - this can be used in complex applicaitons, where cache is configured in one assembly and is used in another, explicilty dissalowing access to concrete implementation classes (this is an example of a very pedantic and safe approaoch where we want to have an application layer consisting of only very very stable external interfaces).
Finally, in my opinion ".Abstractions" package helps to understand the library code as it is much easier to identifiy important files and their default implementation.
from fusioncache.
In this approach would you supposedly also use an "Abstractions" namespace (on top of the separate packages) or would you keep the same namespace but only split packages?
I've seen both approaches and I'd like to start gathering the community's position on this while I think about it.
from fusioncache.
I'm moving this to the recently opened Discussions board.
In case this will be approved to become a feature a separate issue for the design & development will be created.
from fusioncache.
Related Issues (20)
- [BUG] đ§Ŋ Better cleanup while disposing HOT 1
- [FEATURE] đļ NullFusionCache HOT 1
- [FEATURE] đ´ Lazy named caches instantiation HOT 1
- [FEATURE] ⲠBetter timestamping HOT 1
- [FEATURE] â Snapshot testing for binary payload backward compatibility HOT 1
- [FEATURE] đļ More Null Object Pattern support HOT 1
- [FEATURE] đĩ Add `ChaosPlugin` HOT 1
- [FEATURE] đ Better log messages HOT 1
- [FEATURE] đĸ Better Backplane HOT 1
- [FEATURE] âŠī¸ Better Auto-Recovery HOT 1
- [FEATURE] Invalidate complete cache HOT 1
- [FEATURE] đĩ Add `AbstractChaosComponent` HOT 2
- [BUG] NullFusionCache throws when setupAction is used HOT 5
- [FEATURE] Disposing evicted items HOT 12
- [BUG] Setting the entry in memory cache from distributed cache doesn't respect original options HOT 3
- [FEATURE] Complex query and multi Keys/values getOrSet HOT 1
- [FEATURE] Get List by Type of Key Prefix ? HOT 1
- RobiniaDocs API Explorer
- [FEATURE] Expire entire cache HOT 3
- [FEATURE] Limit Memory Size HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fusioncache.