Closed sgf closed 1 year ago
Hi @sgf , and thanks for using FusionCache!
FusionCache is based on the common .NET abstractions IMemoryCache
and IDistributedCache
, as explained in a similar issue here:
FusionCache has been designed to use the 2 common caching abstractions in .NET:
IMemoryCache
andIDistributedCache
, so that any available impl (mostly forIDistributedCache
of course) could've been easily used, without anyone having to explicitly create an implementation of, say, a customIFusionCacheLayer
or something like that. Of course this has advantages - like the one mentioned above - but also disadvantages, like being limited to the features defined in those abstractions.
Because of this, any feature of FusionCache must be either available in those abstractions or implementable on top of them, so the feature you are asking is not doable with the (current, at least) design of FusionCache.
Let me know if this helped.
Problem
need get all api.
Solution
GetListBy<TType>
, FusionCache cached the objs by TType inside?GetOrSet($"{TType}:{id}",...)
the key can be indexed by some thing like Perfix Tree.then we could be search byGetListBy($"{TType}:",....)
to get all StartWith $"{TType}:"Alternatives
no good way
Additional context
nothing