web服务器 - app后端是否需要redis缓存用户常用数据
PHP中文网
PHP中文网 2017-04-24 09:11:10
0
3
576

app客户端每次获取用户的数据,例如:图像、好友列表、个性签名之类的信息,是每次直接读取数据库还是把用户个人信息缓存到redis中?

刚转app后端,遇到一些问题不是很清楚,请大神来指导。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(3)
刘奇

Data that is frequently read and rarely changed can be placed in the cache.
Data with high performance requirements needs to be updated in the cache at the same time as the database. If the requirements are not high, let the cache expiration strategy be tossed by yourself.

Peter_Zhu

I am used to storing it in the cache, but remember to modify the data in the cache when modifying user information

小葫芦

Shouldn’t we first look at the interface access speed and then decide whether caching is necessary? If your table is optimized well enough and the interface is fast enough, why should you use cache?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template