summaryrefslogtreecommitdiff
path: root/app/ServiceProvider
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-08-21 20:36:16 -0400
committerFrederic Guillot <fred@kanboard.net>2016-08-21 20:36:16 -0400
commit1d16a53c480ea7eb93ba118f6ffd69131eb5f3c5 (patch)
tree822a3a22ce1411a1ad10665c6c7b8f3b6c2ed3b5 /app/ServiceProvider
parent8e83e404fbb1d0dc770e5b41fa315a674541459a (diff)
Store comment sorting direction in user metadata
Diffstat (limited to 'app/ServiceProvider')
-rw-r--r--app/ServiceProvider/CacheProvider.php10
1 files changed, 10 insertions, 0 deletions
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;
}
}