# CLDrmPrefetcherAPI Protocol

    public protocol CLDrmPrefetcherAPI : InterceptableAPI

API for prefetching and managing persistent DRM keys.

- `canPrefetch(_:)`

  Checks if the current DRM Instance can prefetch keys for the content received in the player configuration.

  #### Declaration

  Swift

      func canPrefetch(_ config: PlayerConfiguration) -> Bool

  #### Parameters

  `config` | Player configuration.

  #### Return Value

  `true` if the current DRM Instance can prefetch keys a given player configuration.

- `prefetchKeys(_:)`

  Prefetch all keys for current player configuration.

  #### Declaration

  Swift

      func prefetchKeys(_ onComplete: @escaping (PRESTOerror?) -> Void)

  #### Parameters

  `onComplete` | Called on completion.

- `deleteKeys()`

  Remove all the keys related to the content in current player configuration

  #### Declaration

  Swift

      func deleteKeys()

- `playDurationLeft(_:)`

  Returns the remaining playback window for a prefetched/offline license, in seconds. Availability depends on DRM backend and license policy.

  #### Declaration

  Swift

      func playDurationLeft(_ config: PlayerConfiguration?) -> UInt64?

- `storageDurationLeft(_:)`

  Returns the remaining storage window for a prefetched/offline license, in seconds. Availability depends on DRM backend and license policy.

  #### Declaration

  Swift

      func storageDurationLeft(_ config: PlayerConfiguration?) -> UInt64?

- `deleteAllPersistentData()`

  Delete all stored keys and metadata.

  #### Declaration

  Swift

      func deleteAllPersistentData()