openresty / openresty/lua-nginx-module
docs suggestion- a linked "behavior" block for *_by_file directives
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
After reading about how require will only load something once per worker on the group, I wondered if the by_file would as well. It seems it does - but I had to jump through a lot of the docs to figure it out.
I wanted to suggest a small change to the docs.
These 3 sections all talk about this behavior:
- https://github.com/openresty/lua-nginx-module#data-sharing-within-an-nginx-worker
- https://github.com/openresty/lua-nginx-module#init_by_lua
- https://github.com/openresty/lua-nginx-module#lua_code_cache
And a handful of *_by_lua_file reference the lua_code_cache docs.
I think it might be a better reference guide if:
- there was a narrative doc at the top like "How LUA-NGINX caches code and shares data" that consolidates all the info about this behavior
- All the
*_by_lua_filedirectives have a standard text that says something like:
Code caching is affected by
lua_code_cache: Yes [or No]
For more information on code caching, see "How LUA-NGINX caches code"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the three linked sections: data sharing within an NGINX worker, init_by_lua, and lua_code_cache. Review the *_by_lua_file references to lua_code_cache and document the shared caching behavior in one narrative section, with consistent references from each directive. Done means the behavior is consolidated and all relevant directives point to it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100