Class InvalidateRoleCacheJob
This job invalidates the authorisation role cache.
public sealed class InvalidateRoleCacheJob : ScheduledJobBase, IHostedService, IDisposable
- Inheritance
-
InvalidateRoleCacheJob
- Implements
- Inherited Members
Remarks
When a user's roles change, the authorisation role cache needs to be updated to reflect the user's new role set, otherwise that user may continue to have the same level of access as before.
Constructors
InvalidateRoleCacheJob(JobParameters<InvalidateRoleCacheJob>, IOptions<InvalidateRoleCacheOptions>, IEnumerable<RoleCache>)
This job invalidates the authorisation role cache.
public InvalidateRoleCacheJob(JobParameters<InvalidateRoleCacheJob> parameters, IOptions<InvalidateRoleCacheOptions> options, IEnumerable<RoleCache> caches)
Parameters
parametersJobParameters<InvalidateRoleCacheJob>optionsIOptions<InvalidateRoleCacheOptions>cachesIEnumerable<RoleCache>
Remarks
When a user's roles change, the authorisation role cache needs to be updated to reflect the user's new role set, otherwise that user may continue to have the same level of access as before.
Methods
ExecuteJobAsync(IServices, IPrincipal, IProgress<Status>, CancellationToken)
Implements the actual job logic.
protected override Task ExecuteJobAsync(IServices services, IPrincipal principal, IProgress<Status> progress, CancellationToken cancellationToken)
Parameters
servicesIServicesprincipalIPrincipalprogressIProgress<Status>cancellationTokenCancellationToken