Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道哪个是最有效的。在用户登录或传递用户 ID 时分配 7 个会话变量,并在需要信息时进行新的 sql 查询。我也想迎合下载限额较低的移动用户,我们这里没有免费的 wifi。
PHP 都是在服务器端完成的,所以我认为这里对于移动用户没有任何考虑,除了通常的考虑,例如保持页面下载小且易于访问。换句话说,服务器资源是这里的瓶颈,所以随心所欲!一般来说,存储值(缓存)在处理方面会更快,但可能会比根据需要获取更多的内存。