1.0.4 • Published 9 years ago

hapi-static-cache v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

hapi-static-cache

Fast memory based static caching plugin for Hapi.

Queues static file reads into single read operations and stores contents in cache for super fast retrieval.

Install

npm install hapi-static-cache

Usage

The most basic usage is to just use the require method and it will auto register itself and set up your static directory in /static/

server.pack.register(require('hapi-static-cache'), function(error) {
    if (error) {
        throw error;
    }
});

If you don't want to base your static content out of /static/ pass options to the plugin the same as hapi documents.

server.pack.register({
  plugin: require('hapi-static-cache'),
  options: {
      resources: '/public'
  }
}, function(error) {
    if (error) {
        throw error;
    }
});
1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

0.0.1

10 years ago