高并发方案:lua脚本实现nginx+redis+mysql缓存处理
nginx.conf配置文件里定义lua缓存空间具体luangx.header.content_type="application/json;charset=utf8" local uri_args = ngx.req.get_uri_args(); local id = uri_args["id"]; --获取本地缓存 local cache_ngx = ngx.shared.dis_cache;--根据ID 获取本地缓存数据 local contentCache = cache_ngx.
原创
2021-06-22 09:40:30 ·
165 阅读 ·
0 评论