Black Trigram (흑괘) - Korean Martial Arts Combat Simulator API - v0.6.47
    Preparing search index...

    Class AudioCache

    AudioCache - LRU cache implementation for audio assets 오디오 자산을 위한 LRU 캐시 구현

    Index

    Constructors

    Methods

    • Check if can evict (has non-critical assets) 제거 가능 여부 확인 (중요하지 않은 자산이 있는지)

      Returns boolean

      True if there are non-critical assets to evict

    • Evict least-recently-used non-critical asset 최근 사용 빈도가 가장 낮은 중요하지 않은 자산 제거

      Returns void

    • Get asset from cache and update access time 캐시에서 자산을 가져오고 액세스 시간 업데이트

      Parameters

      • id: string

        Asset ID

      Returns AudioAsset | undefined

      Audio asset or undefined if not found

    • Get all cached asset IDs 모든 캐시된 자산 ID 가져오기

      Returns readonly string[]

      Array of asset IDs

    • Get detailed cache information for debugging 디버깅을 위한 상세 캐시 정보 가져오기

      Returns {
          entries: readonly {
              age: number;
              id: string;
              isCritical: boolean;
              lastAccessed: number;
              size: number;
          }[];
          stats: CacheStats;
      }

    • Check if asset exists in cache 캐시에 자산이 있는지 확인

      Parameters

      • id: string

        Asset ID

      Returns boolean

      True if asset is cached

    • Remove asset from cache 캐시에서 자산 제거

      Parameters

      • id: string

        Asset ID

      Returns boolean

      True if asset was removed

    • Add asset to cache with LRU tracking LRU 추적으로 캐시에 자산 추가

      Parameters

      • id: string

        Asset ID

      • asset: AudioAsset

        Audio asset

      • sizeBytes: number

        Estimated size in bytes

      Returns void

    • Update critical assets list 중요 자산 목록 업데이트

      Parameters

      • criticalAssets: readonly string[]

        New list of critical asset IDs

      Returns void

    Properties

    cache: Map<string, CacheEntry> = ...
    criticalAssets: Set<string>
    currentSize: number = 0
    debug: boolean
    evictionCount: number = 0
    hitCount: number = 0
    maxSize: number
    missCount: number = 0