Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

cached-resolver

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cached-resolver

Resolve URLs and cache results to Redis

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

resolve

Resolve URLs and cache results to Redis

Usage

var createResolver = require("./resolver").createResolver;

var resolver = createResolver(options);

resolver.resolve(url, function(err, resolved, cached){});

Where

options include the following properties

  • redis is an object {host:, port:, db:}
  • cacheTTL is the time resolved URLs will be stored
  • userAgent is the User Agent header value for retrieving urls

resolved is the resolved URL or false if not found

cached is true if the data was loaded from db

License

MIT

FAQs

Package last updated on 15 Jan 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