Backend: More efficient mode caching