# FRiCKLE Labs & C2Hosting pres. ngx\_slowfs\_cache

**URL:** <https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568>\
**Category:** NGINX\
**Created:** [December 21, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568 "2009-12-21T23:40:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 21, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/1 "2009-12-21T23:40:08Z")

</div>

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](http://c2hosting.com).

For more information & download please visit:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](http://labs.frickle.com/nginx_ngx_slowfs_cache/)

Best regards,  
Piotr S. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 5:48am UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/2 "2009-12-22T05:48:19Z")

</div>

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](http://c2hosting.com).
> 
> For more information & download please visit:  
> [FRiCKLE Labs / nginx / ngx\_slowfs\_cache](http://labs.frickle.com/nginx_ngx_slowfs_cache/)
> 
> Best regards,  
> Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

–  
Sergey A. Osokin

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 11:50am UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/3 "2009-12-22T11:50:36Z")

</div>

Version 1.1 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](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. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 11:52am UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/4 "2009-12-22T11:52:57Z")

</div>

> 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. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 12:54pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/5 "2009-12-22T12:54:25Z")

</div>

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](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.

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

–  
Sergey A. Osokin,  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/6 "2009-12-22T14:26:17Z")

</div>

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

Thanks!

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 29, 2009, 4:13am UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/7 "2009-12-29T04:13:39Z")

</div>

Version 1.2 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](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. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [December 22, 2009, 9:35pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/8 "2009-12-22T21:35:57Z")

</div>

On Tue, Dec 22, 2009 at 3:50 AM, Sergey A. Osokin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [January 18, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/9 "2010-01-18T17:48:53Z")

</div>

Version 1.3 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](http://labs.frickle.com/nginx_ngx_slowfs_cache/)

GitHub repository is available at:

> **[GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache...](https://github.com/FRiCKLE/ngx_slowfs_cache/)**
>
> nginx module which adds ability to cache static files. - GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache static files.

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. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [June 8, 2010, 12:37pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/10 "2010-06-08T12:37:35Z")

</div>

Version 1.5 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](http://labs.frickle.com/nginx_ngx_slowfs_cache/)

GitHub repository is available at:

> **[GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache...](https://github.com/FRiCKLE/ngx_slowfs_cache/)**
>
> nginx module which adds ability to cache static files. - GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache static files.

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

Best regards,  
Piotr S. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [May 25, 2010, 10:54am UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/11 "2010-05-25T10:54:32Z")

</div>

Version 1.4 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](http://labs.frickle.com/nginx_ngx_slowfs_cache/)

GitHub repository is available at:

> **[GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache...](https://github.com/FRiCKLE/ngx_slowfs_cache/)**
>
> nginx module which adds ability to cache static files. - GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache static files.

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

Best regards,  
Piotr S. \< removed\_email\_address@domain.invalid \>

---

<div class="post-metadata">

**Author:** ![piotrs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@piotrs](https://www.ruby-forum.com/u/piotrs)\
**Post date:** [May 3, 2011, 7:16pm UTC](https://www.ruby-forum.com/t/frickle-labs-c2hosting-pres-ngx-slowfs-cache/180568/12 "2011-05-03T19:16:28Z")

</div>

Version 1.6 is now available at:  
[http://labs.frickle.com/nginx\_ngx\_slowfs\_cache/](http://labs.frickle.com/nginx_ngx_slowfs_cache/)

GitHub repository is available at:

> **[GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache...](https://github.com/FRiCKLE/ngx_slowfs_cache/)**
>
> nginx module which adds ability to cache static files. - GitHub - FRiCKLE/ngx\_slowfs\_cache: nginx module which adds ability to cache static files.

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. \< removed\_email\_address@domain.invalid \>
