I use Berkeley DB(BDB) in nginx. When a request arrives, nginx passes the URI as a key to BDB and checks if that key has a value in BDB file.
I actually did in an example. I add some data in BDB, and run nginx, it's OK. I can access it. But when I add some data in running BDB with nginx (using Python), I can't get the new data. Even I use the another python interpreter access the BDB file, it was actually has the new data.
Steps of the request in nginx:
- start up nginx, and it will init my plugin (BDB env and init)
- a request comes in
- control in plugin, check if key(uri) has a value. If true, return it, or pass
- ...rest of process