You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@frozenminds You just need to be careful about running phases of each nginx directives used here. The basic running order in each location is
if/rewrite (rewrite phase)
srcache_fetch (end of access-phase)
fastcgi_pass (content phase)
srcache_store (during response sending to the downstream)
So if you use rewrite in a location, A, to initiate an "internal redirect" into another location, say, B. Then the srcache_fetch and srcache_store directives configured in location A will NEVER run.
The rule of thumb is to put srcache_fetch and srcache_store in the location containing your content handler modules' directives (like fastcgi_pass), no matter it is a named location or what.
BTW, please use the openresty-en mailing list for such general questions in the future. Please see http://openresty.org/#Community Thank you for your cooperation!
Hello,
How can I forward requests that did not match any cached entry to a named route?
I have something like:
Should I place
srcache_fetch
andsrcache_store
in location/
or@backend
? Are there any issues if the fallback istry_files
orrewrite
?Thank you in advance!
The text was updated successfully, but these errors were encountered: