openresty / openresty/srcache-nginx-module
Forward to named route or rewrite?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 486
- Forks
- 101
- Avg merge
- 1h 28m
- Merged PRs (30d)
- 2
Description
Hello,
How can I forward requests that did not match any cached entry to a named route?
I have something like:
location / {
try_files $uri $uri/ @backend;
}
location @backend {
rewrite / /index.php;
}
location ~ \.php$ {
# catch 404s
if (!-e $request_filename) { rewrite / /index.php last; }
expires off;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
Should I place srcache_fetch and srcache_store in location / or @backend? Are there any issues if the fallback is try_files or rewrite?
Thank you in advance!
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
The issue names no repository file or test; start with the shown location /, @backend, and PHP locations and trace how srcache_fetch and srcache_store interact with try_files and rewrite. Done means documenting a clear recommendation for directive placement and fallback behavior, supported by a reproducible configuration test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nginx
- Domain
- backend, performance
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100