summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php
index 77b0a89a90b..abbb67ee5be 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -652,6 +652,7 @@ class OC {
OC_User::setupBackends();
}
+ self::registerCacheHooks();
self::registerFilesystemHooks();
if (\OC::$server->getSystemConfig()->getValue('enable_previews', true)) {
self::registerPreviewHooks();
@@ -719,6 +720,19 @@ class OC {
});
}
+ /**
+ * register hooks for the cache
+ */
+ public static function registerCacheHooks() {
+ //don't try to do this before we are properly setup
+ if (\OC::$server->getSystemConfig()->getValue('installed', false) && !\OCP\Util::needUpgrade()) {
+
+ // NOTE: This will be replaced to use OCP
+ $userSession = self::$server->getUserSession();
+ $userSession->listen('postLogin', '\OC\Cache\File', 'loginListener');
+ }
+ }
+
private static function registerEncryptionWrapper() {
\OCP\Util::connectHook('OC_Filesystem', 'preSetup', 'OC\Encryption\Manager', 'setupStorage');
}