Fixes #16469: Allow cache to be specified as interface and to be configured in DI container

This commit is contained in:
Dmitry V. Alexeev
2018-12-10 11:41:45 +03:00
committed by Alexander Makarov
parent 4656e2dcdc
commit b5be47321b
3 changed files with 14 additions and 3 deletions

View File

@ -290,7 +290,7 @@ class CacheController extends Controller
*/
private function isCacheClass($className)
{
return is_subclass_of($className, 'yii\caching\CacheInterface');
return is_subclass_of($className, 'yii\caching\CacheInterface') || $className === 'yii\caching\CacheInterface';
}
/**