当前位置:网站首页>Openresty Lua resty mlcache multi-level cache
Openresty Lua resty mlcache multi-level cache
2022-07-25 19:19:00 【o_ Guatian Lixia_ o】
openresty lua-resty-mlcache Multi level cache
Official website :https://github.com/thibaultcha/lua-resty-mlcache
Multi level cache

First level cache : Use lrucache Store the most commonly used data , Every worker Use a single memory
Second level cache : Use lua_shared_dict Store shared data , When the L1 cache misses , Read data from L2 cache
Three level cache : One 、 L2 cache miss , Just read data from the back end ( Use lock Lock , Avoid a large number of requests accessing at the same time ), And store the data in the L2 cache , And others worker share
Create cache instance
new: Create cache instance
Grammar format :cache, err = mlcache.new(name, shm, opts?)
* Create cache instance , If the creation fails , return nil、 error message
* name: The name of the cache instance , If different cache instances name identical , Then data sharing
* shm:lua_shared_dict Shared cache name , If different mlcache Of shm identical , Then data sharing
* opts: Optional parameters
* lru_size: L1 cache size , Default 100
* ttl: Cache expiration time , The unit is in seconds , Set to 0 Never expire , Default 30
* neg_ttl: When the L3 cache returns nil when , Cache expiration time , The unit is in seconds , Set to 0 Never expire , Default 5
* resurrect_ttl: When 3 Level cache return nil, Extend expiration cache time , The unit is in seconds 边栏推荐
- Pymoo学习 (8):Gradients
- 微信小程序 27 进度条的动态实现和搜索框、热搜榜的静态搭建
- 房地产行业大洗牌
- [web technology] 1391 page visualization building tool, previous life and present life
- 这种动态规划你见过吗——状态机动态规划之股票问题(上)
- 平衡二叉树
- Based on easycv to reproduce Detr and dab-detr, the correct opening method of object query
- Dynamic implementation of wechat applet 27 progress bar and static construction of search box and hot search list
- 微信小程序 26 播放音乐页的完善②
- 帝国CMS7.5仿《问答库》题库问答学习平台网站源码 带手机版
猜你喜欢
![[open source project] stm32c8t6 + ADC signal acquisition + OLED waveform display](/img/5f/413f1324a8346d7bc4a9490702eef4.png)
[open source project] stm32c8t6 + ADC signal acquisition + OLED waveform display

Wechat campus maintenance and repair applet graduation design finished product of applet completion work (4) opening report

【刷题记录】21. 合并两个有序链表

Modelsim and quartus jointly simulate PLL FIFO and other IP cores

MES管理系统有什么应用价值

基础乐理之音程的度数

【DETR用于3D目标检测】3DETR: An End-to-End Transformer Model for 3D Object Detection

Pymoo learning (6): termination conditions

Microsoft azure and Analysys jointly released the report "Enterprise Cloud native platform driven digital transformation"

Talk about 15 tips of SQL optimization
随机推荐
【DETR用于3D目标检测】3DETR: An End-to-End Transformer Model for 3D Object Detection
Introduction of this course (Introduction to machine learning)
iMeta | Sangerbox: 交互式整合临床生信分析平台
In the first half of the year, the shipment volume has exceeded that of the whole year of last year, and centritec millimeter wave radar has "captured" the international giant
平衡二叉树
果链“围城”:傍上苹果,是一场甜蜜与苦楚交错的旅途
聚智云算,向新而生| 有孚网络“专有云”开启新纪元
有孚原力超算,为客户提供定制化高性能计算服务
基础乐理--配置和弦
有孚网络受邀参加2022全国CIO大会并荣获“CIO信赖品牌”称号
How to design product help center? The following points cannot be ignored
基础乐理之音程的度数
Detailed explanation of Bluetooth protocol (what is Bluetooth)
Hongmeng - Damiao computing Sketchpad - VIDEO
基于Mysql-Exporter监控Mysql
What is the application value of MES management system
无惧高温暴雨,有孚网络如何保您无忧?
房地产行业大洗牌
微信小程序 29 热搜榜的完善②
[reading notes] deep learning Chapter 1: Introduction