Serve from cache but fire request to upstream server to increment page view counter

Antonio P.P. Almeida appa at perusio.net
Wed Apr 4 08:09:43 UTC 2012


There's the post_action directive. But AFAIK is not that reliable.

I would use Lua with the "new" cosocket API and do an HTTP request.

Here's an example of a library built around it that talks with a Redis
backend: https://github.com/agentzh/lua-resty-redis

As stated post_action is another option:

http://wiki.nginx.org/HttpCoreModule#post_action


--appa



More information about the nginx mailing list