doy51723 2017-07-12 10:03
浏览 69

我应该缓存文件的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.

  • 写回答

2条回答 默认 最新

  • dsogx84602 2017-07-12 10:08
    关注

    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.

    评论

报告相同问题?