Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hapi-static-cache

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-static-cache

Static file caching for saving time.

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

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;
    }
});

Keywords

FAQs

Package last updated on 24 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc