Welcome! Log In Create A New Profile

Advanced

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

Antonio P.P. Almeida
April 04, 2012 04:10AM
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

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Quintin Par April 03, 2012 02:46AM

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

Quintin Par April 04, 2012 12:10AM

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

Antonio P.P. Almeida April 04, 2012 04:10AM

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

Quintin Par April 04, 2012 08:18AM

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

Antonio P.P. Almeida April 04, 2012 08:22AM

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

Jonathan Matthews April 04, 2012 08:28AM

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

Quintin Par April 04, 2012 11:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 216
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready