openresty / openresty/lua-nginx-module

docs suggestion- a linked "behavior" block for *_by_file directives

Open
#714 1 comment 0 reactions 0 assignees View on GitHub

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:

And a handful of *_by_lua_file reference the lua_code_cache docs.

I think it might be a better reference guide if:

  1. 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
  2. All the *_by_lua_file directives 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.