Use cache.driver interface and fix tests