Merge pull request #36 from scambra/filecache-fixes

delete fscache on deleting user
This commit is contained in:
icewind1991 2012-10-16 11:46:50 -07:00
commit 247626b5c2
2 changed files with 10 additions and 1 deletions

View File

@ -203,7 +203,7 @@ class OC_FileCache{
OC_Cache::remove('fileid/'.$root.$path);
}
/**
* return array of filenames matching the querty
* @param string $query
@ -509,3 +509,4 @@ class OC_FileCache{
OC_Hook::connect('OC_Filesystem','post_write','OC_FileCache_Update','fileSystemWatcherWrite');
OC_Hook::connect('OC_Filesystem','post_delete','OC_FileCache_Update','fileSystemWatcherDelete');
OC_Hook::connect('OC_Filesystem','post_rename','OC_FileCache_Update','fileSystemWatcherRename');
OC_Hook::connect('OC_User','post_deleteUser','OC_FileCache_Update','deleteFromUser');

View File

@ -216,4 +216,12 @@ class OC_FileCache_Update{
OC_FileCache::increaseSize(dirname($newPath), $oldSize, $root);
OC_FileCache::move($oldPath, $newPath);
}
/**
* delete files owned by user from the cache
* @param string $parameters$parameters["uid"])
*/
public static function deleteFromUser($parameters) {
OC_FileCache::clear($parameters["uid"]);
}
}