Move code inside check cache
Add group_get_by_name, mailbox_get_by_name function