Fix mode handling
Caching API