storing avatars in cache with proper filenames