我应该缓存文件的md5还是足够快,不需要?

I need to check md5 checksum of ~10-20 files on server every time a user logs in. Each file can be ~10MB. Should I cache md5 of these files or do it in real-time without wasting time & bothering?

P. S. there will probably be up to 10k logins a day.

That depends on the requirements, checking a cached value is not the same as getting a file checksum.

So based on the first sentence - I need to check md5 checksum of ~10-20 files - no, you cannot cache it.

However, if you just need to display a checksum, then yes, you can and should cache it and check the file-integrity periodically with a cron-job if necessary.

If the files are same for all users, then in that case I would suggest you to cache the md5 of file so that each time you need not to get the file md5 and get it simply from cache.