Skip to content

Commit

Permalink
Merge pull request #16796 from owncloud/fix-login-listener-for-file-c…
Browse files Browse the repository at this point in the history
…ache

Fix login handler for file cache - fixes #16795
  • Loading branch information
DeepDiver1975 committed Jun 8, 2015
2 parents a968b84 + 97a3d8c commit 1769de0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 4 additions & 1 deletion lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,10 @@ public static function registerCacheHooks() {

// NOTE: This will be replaced to use OCP
$userSession = self::$server->getUserSession();
$userSession->listen('postLogin', '\OC\Cache\File', 'loginListener');
$userSession->listen('\OC\User', 'postLogin', function () {
$cache = new \OC\Cache\File();
$cache->gc();
});
}
}

Expand Down
5 changes: 0 additions & 5 deletions lib/private/cache/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,4 @@ public function gc() {
}
}
}

public static function loginListener() {
$c = new self();
$c->gc();
}
}

0 comments on commit 1769de0

Please sign in to comment.