Socket
Book a DemoInstallSign in
Socket

nibelu-ng

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nibelu-ng

'AngularJS Wrappers for Nibelung'

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
2
Created
Source

nibelu-ng: AngularJS Wrappers for Nibelung

Circle CI

Brings the power of nibelung to AngularJS.

This library does two things:

  • It exposes nibelung as an Angular module and service.
angular.module('your-module', ['nibelu-ng'])
  .service('yourService', function (nibelung) {
    var cache = new nibelung.Hoard({
      namespace: 'foo'
    });
  })
  • It provides an $http-compatible cache backed by Nibelung, which allows you to specify TTLs, persistence, and other goodies for your $http calls.
.service('yourService', function (HttpHoard) {
  var tenSecondCache = new HttpHoard({
    namespace: 'httpCache',
    ttlMilliseconds: 10000 // Cache records will expire 10 seconds after completion.
  });

  function getStuffWithTenSecondCache(url) {
    return $http.get('foo/bar', {
      cache: tenSecondCache
    });
  }

  return {
    getStuffWithTenSecondCache: getStuffWithTenSecondCache
  };
});

See the original library for all the config options.

You can get it with the usual suspects:

bower install nibelu-ng
npm install nibelu-ng

Keywords

Caching

FAQs

Package last updated on 26 Aug 2015

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