Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc

## Class PersistentTokenCacheAccessAspect

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.PersistentTokenCacheAccessAspect

All Implemented Interfaces:
  `com.microsoft.aad.msal4j.ITokenCacheAccessAspect`

    public class PersistentTokenCacheAccessAspect
    extends Object
    implements com.microsoft.aad.msal4j.ITokenCacheAccessAspect

Access aspect for accessing the token cache. MSAL token cache does not persist beyond lifetime of the application. This class implements the ITokenCacheAccessAspect interface to persist the token cache between application instances so subsequent authentications can use silent authentication if the user account is in the token cache.

See Also:
  https://aka.ms/msal4j-token-cache

### Constructor Summary

Constructors
`PersistentTokenCacheAccessAspect()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `afterCacheAccess​(com.microsoft.aad.msal4j.ITokenCacheAccessContext iTokenCacheAccessContext)`
`void` `beforeCacheAccess​(com.microsoft.aad.msal4j.ITokenCacheAccessContext iTokenCacheAccessContext)`
`long` `getExpiryTime()` Get expiry time
`void` `setExpiryTime​(long expiryTime)` Set expiry time

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PersistentTokenCacheAccessAspect

    public PersistentTokenCacheAccessAspect()

### Method Detail

#### beforeCacheAccess

    public void beforeCacheAccess​(com.microsoft.aad.msal4j.ITokenCacheAccessContext iTokenCacheAccessContext)

Specified by:
  `beforeCacheAccess` in interface `com.microsoft.aad.msal4j.ITokenCacheAccessAspect`

#### afterCacheAccess

    public void afterCacheAccess​(com.microsoft.aad.msal4j.ITokenCacheAccessContext iTokenCacheAccessContext)

Specified by:
  `afterCacheAccess` in interface `com.microsoft.aad.msal4j.ITokenCacheAccessAspect`

#### getExpiryTime

    public long getExpiryTime()

Get expiry time

Returns:
  expiry time

#### setExpiryTime

    public void setExpiryTime​(long expiryTime)

Set expiry time

Parameters:
  `expiryTime` - expiry time