bugfix: you have to give the user id as second parameter
added a cache to avoid too many queries
implemented a cache to avoid too many queries