We have recently found out about nginxes
We were wondering it there was a way to use this directive if a proxy cache hit is made?
The flow we were hoping on is as follows:
1) User request comes in 2) If cache HIT goto A / If cache MISS goto B A) 1) Serve Cached Result A) 2) post_action to another url on the backend B) 1) Server request from backend B) 2) Store result from backend
Any ideas if this is possible via post_action or any other method?
The reasoning behind this is as follows:
We would in essence like to modify the users session (php, but the same concept can apply to most server side languages) while displaying cached content. This would greatly increase the number of cache-able requests we process since these requests only WRITE to sessions, not read from them.