Implement NSCache, fix a minor caching bug when uploading avatar