YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
de.yaacc.util.SAFCacheManager Class Reference

LRU cache for SAF (Storage Access Framework) file metadata with background preloading. More...

Collaboration diagram for de.yaacc.util.SAFCacheManager:
Collaboration graph

Public Member Functions

SAFMetadata getMetadata (DocumentFile file)
 Get complete metadata for a SAF file (duration, MIME type, encoded ID).
 
String getDuration (Uri uri)
 Get duration from cache or extract if not cached.
 
void preloadSafDurations ()
 Preload durations for SAF files in background.
 
void trimCache ()
 Clear old entries beyond MAX_CACHE_SIZE.
 
void shutdown ()
 
boolean isPreloading ()
 
int getTotalFilesIndexed ()
 
int getCacheSize ()
 

Static Public Member Functions

static synchronized SAFCacheManager getInstance (Context context)
 

Detailed Description

LRU cache for SAF (Storage Access Framework) file metadata with background preloading.

Caches duration, MIME type, and encoded IDs for fast browsing.

Member Function Documentation

◆ getDuration()

String de.yaacc.util.SAFCacheManager.getDuration ( Uri  uri)

Get duration from cache or extract if not cached.

Deprecated:
Use getMetadata() instead

◆ getMetadata()

SAFMetadata de.yaacc.util.SAFCacheManager.getMetadata ( DocumentFile  file)

Get complete metadata for a SAF file (duration, MIME type, encoded ID).

Returns cached data if available, otherwise extracts synchronously.

Here is the call graph for this function:

The documentation for this class was generated from the following file: