FRiCKLE Labs & C2Hosting pres. ngx_slowfs_cache

Hello,
let me introduce another nginx module.

ngx_slowfs_cache is a module which allows caching of static files
(served using “root” directive). This enables one to create
fast caches for files stored on slow filesystems, for example:

  • storage: network disks, cache: local disks,
  • storage: 7,2K SATA drives, cache: 15K SAS drives in RAID0.

Module configuration directives:
slowfs_cache,
slowfs_cache_key,
slowfs_cache_purge,
slowfs_cache_path,
slowfs_temp_path,
slowfs_cache_min_uses,
slowfs_cache_valid,
slowfs_big_file_size.

Module configuration variables:
$slowfs_cache_status.

This module was fully funded by c2hosting.com.

For more information & download please visit:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

Best regards,
Piotr S. < [email protected] >

Hi Piotr.

I’d like add your new module to FreeBSD ports tree for www/nginx and
www/nginx-devel ports. It looks like your module can’t be build with
latest
stable version 0.7.64, but builts successfully with development version
0.8.30.

Here is compile log with 0.7.64.

cc -c -O2 -pipe -fno-strict-aliasing -I /usr/local/include
-D_LARGEFILE_SOURCE -DBUILDING_NGINX -I src/core -I src/event -I
src/event/modules -I src/os/unix -I
/usr/home/osa/ports/www/nginx/work/nginx_http_push_module-0.69/src -I
objs -I src/http -I src/http/modules -I
/usr/home/osa/ports/www/nginx/work/ngx_supervisord-1.2 -I src/mail -o
objs/addon/ngx_slowfs_cache-1.0/ngx_http_slowfs_module.o
/usr/home/osa/ports/www/nginx/work/ngx_slowfs_cache-1.0/ngx_http_slowfs_module.c
/usr/home/osa/ports/www/nginx/work/ngx_slowfs_cache-1.0/ngx_http_slowfs_module.c:
In function ‘ngx_http_slowfs_static_send’:
/usr/home/osa/ports/www/nginx/work/ngx_slowfs_cache-1.0/ngx_http_slowfs_module.c:227:
error: ‘ngx_open_file_info_t’ has no member named ‘read_ahead’
/usr/home/osa/ports/www/nginx/work/ngx_slowfs_cache-1.0/ngx_http_slowfs_module.c:227:
error: ‘ngx_http_core_loc_conf_t’ has no member named ‘read_ahead’
*** Error code 1

Anyway, thank you for your new module!

On Mon, Dec 21, 2009 at 11:36:09PM +0100, Piotr S. wrote:

slowfs_cache,

This module was fully funded by c2hosting.com.

For more information & download please visit:
FRiCKLE Labs / nginx / ngx_slowfs_cache

Best regards,
Piotr S. < [email protected] >


Sergey A. Osokin

Version 1.1 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

Changes:
2009-12-22 VERSION 1.1
* Fix build for nginx versions older than 0.8.18 (this includes
0.7.x
line).
Reported by Sergey A. Osokin.

Best regards,
Piotr S. < [email protected] >

I’d like add your new module to FreeBSD ports tree for www/nginx and
www/nginx-devel ports. It looks like your module can’t be build with
latest
stable version 0.7.64, but builts successfully with development version
0.8.30.

Here is compile log with 0.7.64.

Compatibility with 0.7.x line is the thing I always forget about!

Thanks for the report! I’ll look into this in a moment.

Best regards,
Piotr S. < [email protected] >

On Tue, Dec 22, 2009 at 11:46:38AM +0100, Piotr S. wrote:

Version 1.1 is now available at:
FRiCKLE Labs / nginx / ngx_slowfs_cache

Changes:
2009-12-22 VERSION 1.1

  • Fix build for nginx versions older than 0.8.18 (this includes 0.7.x
    line).
    Reported by Sergey A. Osokin.

Version 1.1 support committed (added for www/nginx and updated for
www/nginx-devel).


Sergey A. Osokin,
[email protected]
[email protected]

Version 1.1 support committed (added for www/nginx and updated for
www/nginx-devel).

Thanks!

Best regards,
Piotr S. < [email protected] >

Version 1.2 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

Changes:
2009-12-29 VERSION 1.2
* Enable caching of 0 byte files in nginx-0.8.31+.

Best regards,
Piotr S. < [email protected] >

On Tue, Dec 22, 2009 at 3:50 AM, Sergey A. Osokin [email protected]
wrote:

Version 1.1 support committed (added for www/nginx and updated for
www/nginx-devel).

Hello,

I was wondering if you had added fastcgi.conf from 0.8.30/conf/ folder
to the www/nginx-devel port yet. I installed it on two different
boxes recently and I had to create the file myself, which is trivial,
but we are recommending new configurations to use this file so it
would be great if it was there :D.

Thanks,
Merlin

Version 1.3 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

GitHub repository is available at:

Changes:
2010-01-18 VERSION 1.3
* Add missing cast, apparently some systems had trouble
building module without this.
Reported by Serhan Sevim.

Best regards,
Piotr S. < [email protected] >

Version 1.5 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

GitHub repository is available at:

Changes:
2010-06-08 VERSION 1.5
* Fix build for nginx-0.7.66+.

Best regards,
Piotr S. < [email protected] >

Version 1.4 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

GitHub repository is available at:

Changes:
2010-05-25 VERSION 1.4
* Fix build for nginx-0.8.38+.
Patch from Sergey A. Osokin.

Best regards,
Piotr S. < [email protected] >

Version 1.6 is now available at:
http://labs.frickle.com/nginx_ngx_slowfs_cache/

GitHub repository is available at:

Changes:
2011-05-03 VERSION 1.6
* Fix compatibility with nginx-1.0.1.
Reported by Sergey A. Osokin.

2011-04-21
* Stop doing sanity checks when module isn’t enabled.
Reported by Tobi Tamas.

Best regards,
Piotr S. < [email protected] >