diff options
Diffstat (limited to 'app/ServiceProvider/CacheProvider.php')
-rw-r--r-- | app/ServiceProvider/CacheProvider.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/ServiceProvider/CacheProvider.php b/app/ServiceProvider/CacheProvider.php index e93dd502..af8a8e7a 100644 --- a/app/ServiceProvider/CacheProvider.php +++ b/app/ServiceProvider/CacheProvider.php @@ -8,6 +8,7 @@ use Kanboard\Decorator\ColumnMoveRestrictionCacheDecorator; use Kanboard\Decorator\ColumnRestrictionCacheDecorator; use Kanboard\Decorator\MetadataCacheDecorator; use Kanboard\Decorator\ProjectRoleRestrictionCacheDecorator; +use Kanboard\Decorator\UserCacheDecorator; use Pimple\Container; use Pimple\ServiceProviderInterface; @@ -40,6 +41,13 @@ class CacheProvider implements ServiceProviderInterface $container['cacheDriver'] = $container['memoryCache']; } + $container['userCacheDecorator'] = function($c) { + return new UserCacheDecorator( + $c['memoryCache'], + $c['userModel'] + ); + }; + $container['userMetadataCacheDecorator'] = function($c) { return new MetadataCacheDecorator( $c['cacheDriver'], |