IRequestToBeDisposed
IRequestToBeDisposed indicates that the result object from this request is to be disposed along service or its cache. Note that, this is however default behaviour with default entry policy, even without the interface.
/// <summary>Indicates that if the result of this request is cached and is disposable, then it is to be disposed. Requires <see cref="EntryPolicies.Default"/> or <see cref="EntryPolicies.UseInterface"/> entry policy.</summary>
public interface IRequestToBeDisposed : IRequest { }
/// <summary>Request to print record-like object as json-string</summary>
public record PrintAsJson(Object record) : IRequestToBeDisposed;
IRequestNotToBeDisposed
IRequestNotToBeDisposed indicates that the result object from this request is not to be disposed. This overrides the default behaviour.
/// <summary>Indicates that the result of this request is not to be disposed. Requires <see cref="EntryPolicies.Default"/> or <see cref="EntryPolicies.UseInterface"/>.</summary>
public interface IRequestNotToBeDisposed : IRequest { }
/// <summary>Request to print record-like object as json-string</summary>
public record PrintAsJson(Object record) : IRequestNotToBeDisposed;
IRequestNotToBeDisposed and IRequestToBeDisposed require that EntryPolicies.Default or EntryPolicies.UseInterface are used, and they are applied with default settings.