Table of Contents

Class InvalidateRoleCacheJob

Namespace
The.Web.Jobs
Assembly
Instagile.Web.Client.dll

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

parameters JobParameters<InvalidateRoleCacheJob>
options IOptions<InvalidateRoleCacheOptions>
caches IEnumerable<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

services IServices
principal IPrincipal
progress IProgress<Status>
cancellationToken CancellationToken

Returns

Task