Skip to main content
Namespace: Molca.Networking.Utils
Interface: ICacheService
File: Packages/com.molca.core/Runtime/Networking/Utils/Caching/CacheManager.cs
Type: RuntimeSubsystem (child of RuntimeManager prefab)

When to use

Use CacheManager for caching network responses (textures, audio clips, data) to disk. It manages a persistent cache in Application.persistentDataPath/Network Cache/ with configurable type selection via CachingSelection flags.
⚠️ The static API (CacheManager.Cache, CacheManager.IsCached, etc.) is deprecated. Use the ICacheService instance interface.

Role

  • Disk cache — stores cached data under Application.persistentDataPath/Network Cache/.
  • Type selectionCachingSelection flags control which asset types are cached (Texture, AudioClip, Data).
  • Auto-validate — on initialization, validates cached files and removes stale or corrupted entries.
  • Android storage permission — requests ExternalStorageWrite permission on Android automatically.

Inspector configuration

API Reference

Resolve via RuntimeManager.GetService<ICacheService>() or [Inject] ICacheService.

Code

  • RuntimeManagerCacheManager is a child subsystem
  • HttpClient — network responses can be cached through this manager
  • Encryption — cache files can be encrypted at rest