Caching for groups and contacts

This is HW8.
Please, ignore previous commit