ngx_shared.DICT 源码正文:dict.lua 部分源码如下: localffi=require'ffi'localbase=require"resty.core.base"localffi_new=ffi.newlocalffi_str = ffi.stringlocalC=ffi.Clocalget_string_buf=base.get_string_buflocalget_string_buf_size=base.get_string_buf_sizelocalget_size_ptr=base.get_size_ptrlocal...
ngx.shared.DICT.delete ngx.shared.DICT.incr ngx.shared.DICT.flush_all ngx.shared.DICT.flush_expired ngx.shared.DICT.get_keys ndk.set_var.DIRECTIVE #不懂
ngx.shared.DICT.get_stale ngx.shared.DICT.set ngx.shared.DICT.safe_set ngx.shared.DICT.add ngx.shared.DICT.safe_add ngx.shared.DICT.replace ngx.shared.DICT.delete ngx.shared.DICT.incr ngx.shared.DICT.flush_all ngx.shared.DICT.flush_expired ngx.shared.DICT.get_keys ngx.socket.udp udpsock...
ngx_http_config.h ngx_http_copy_filter_module.c ngx_http_core_module.c ngx_http_core_module.h ngx_http_file_cache.c ngx_http_header_filter_module.c ngx_http_huff_decode.c ngx_http_huff_encode.c ngx_http_parse.c ngx_http_postpone_filter_module.c ...
dict = ngx.shared.DICT 访问lua_shared_dict定义的共享内存lua字典 dict = ngx.shared[name_var] get 例如value, flags = ngx.shared.DICT:get(key) get_stale 即时过期也返回数据 set 例如success, err, forcible = ngx.shared.DICT:set(key, value, exptime?, flags?) ...
nginx shared memory map module. Contribute to hexiay/ngx_shmap development by creating an account on GitHub.
我们知道,如果我们的模块中要使用一个共享内存,需要调用ngx_shared_memory_add来创建共享内存。而ngx_shared_memory_add不会马上创建一个共享内存,它是先登记一下共享内存的使用信息,比如名称、大小等,然后在进程初始化的时候再进行共享内存的创建与初始化。 那么,ngx_shared_memory_add这个函数是将共享内存的分配...
shm_zone = ngx_shared_memory_add(cf, &dmcf->shm_name, dmcf->shm_size, &ngx_http_dyups_module); shm_zone->data = cf->pool; // 加进去的这个名头的共享内存块的init函数会在初始化的时候统一调用 shm_zone->init = ngx_http_dyups_init_shm_zone; ...
ngx_rtmp_free_shared_chain(cscf, cache->audio_seq_header); cache->audio_seq_header = NULL; } if (cache->meta) { ngx_rtmp_free_shared_chain(cscf, cache->meta); cache->meta_version = 0; cache->meta = NULL; } cache->video_frame_in_this = 0; ...
shm_zone = ngx_shared_memory_add(cf, &dmcf->shm_name, dmcf->shm_size, &ngx_http_dyups_module); shm_zone->data = cf->pool; // 加进去的这个名头的共享内存块的init函数会在初始化的时候统一调用 shm_zone->init = ngx_http_dyups_init_shm_zone; ...