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

Quintin Par quintinpar at gmail.com
Wed Apr 4 12:17:22 UTC 2012


Thanks Appa.

Why would you say this is not reliable? Is there data or experience to
suggest? The semantic is awesome. Precisely what I’ve been looking for.

-Cherian

On Wed, Apr 4, 2012 at 1:39 PM, Antonio P.P. Almeida <appa at perusio.net>wrote:

> 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120404/c4cb40c5/attachment.html>


More information about the nginx mailing list