From 1d16a53c480ea7eb93ba118f6ffd69131eb5f3c5 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 21 Aug 2016 20:36:16 -0400 Subject: Store comment sorting direction in user metadata --- app/ServiceProvider/CacheProvider.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/ServiceProvider') diff --git a/app/ServiceProvider/CacheProvider.php b/app/ServiceProvider/CacheProvider.php index 0d56e601..fac44d53 100644 --- a/app/ServiceProvider/CacheProvider.php +++ b/app/ServiceProvider/CacheProvider.php @@ -4,6 +4,7 @@ namespace Kanboard\ServiceProvider; use Kanboard\Core\Cache\FileCache; use Kanboard\Core\Cache\MemoryCache; +use Kanboard\Decorator\MetadataCacheDecorator; use Pimple\Container; use Pimple\ServiceProviderInterface; @@ -36,6 +37,15 @@ class CacheProvider implements ServiceProviderInterface $container['cacheDriver'] = $container['memoryCache']; } + $container['userMetadataCacheDecorator'] = function($c) { + return new MetadataCacheDecorator( + $c['cacheDriver'], + $c['userMetadataModel'], + 'user.metadata.', + $c['userSession']->getId() + ); + }; + return $container; } } -- cgit v1.2.3