SCCameraKitCachesManager

Objective-C

@protocol SCCameraKitCachesManager <NSObject>

Swift

protocol CachesManager : NSObjectProtocol

Protocol for managing CameraKit caches.

  • Clears the specified cache type and executes the completion block when finished.

    Declaration

    Objective-C

    - (void)clearCacheOfType:(SCCameraKitCacheType)type
                  completion:(nonnull dispatch_block_t)completion;

    Swift

    func clearCache(of type: CacheType) async

    Parameters

    type

    The type of cache to clear.

    completion

    A block to execute when clearing completes.

  • Retrieves cache statistics for the specified cache type.

    Declaration

    Objective-C

    - (void)fetchCacheStatisticsForType:(SCCameraKitCacheType)type
                             completion:(nullable void (^)(
                                            SCCameraKitCacheStatistics))completion;

    Swift

    func fetchCacheStatistics(for type: CacheType) async -> CacheStatistics

    Parameters

    type

    The type of cache to query.

    completion

    A block that receives cache statistics.