Welcome! Log In Create A New Profile

Advanced

Writing a cache module

Akins, Brian
September 28, 2009 03:10PM
I need to write cache module that's not upstream based. (Long story...)

Reading through the upstream code and the proxy and fastcgi modules, it
looks fairly simple.

Just so I know I'm on the right track:

- to get something from cache I should generate a key for r->cache, try to
open file using ngx_http_file_cache_open, then "serve" it using
ngx_http_cache_send (or replicate what it does).

-to store something in cache, create a ngx_temp_file_t store my data in
there, generate a key, then call ngx_http_file_cache_update to add that file
to cache.

Is that reasonable? Any gotchas?

--
Brian Akins
Subject Author Posted

Writing a cache module

Akins, Brian September 28, 2009 03:10PM

Re: Writing a cache module

Igor Sysoev September 28, 2009 03:38PM

Re: Writing a cache module

Akins, Brian September 28, 2009 04:02PM

Re: Writing a cache module

cripy November 13, 2009 11:42AM

Re: Writing a cache module

Akins, Brian November 13, 2009 12:58PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 281
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