public class ProfileServiceCachingOptions<T>
where T : class, IProfileService
{
.....
///<summary>
/// A predicate that will determine whether the current ActiveContext should be cached or not, default to true on all IsActiveContext instances.
/// </summary>
public Func<IsActiveContext, bool> ShouldCache { get; set; } = (context) => true;
.....
}
When use Profile Service Caching, we may have cases where the caching decision would be made based on certain criteria.
A proposal is to add a new option would be added to ProfileServiceCachingOptions as: