Skip to content

mapbox/tilelive-multicache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

tilelive-multicache

Module for adding a caching layer in front a tilelive source. It wraps a tilelive backend providing a new source constructor with cached superpowers!

var options = {
    client: client, // Required, instantiated client
    ttl: 300,       // optional, object cache ttl in seconds
    stale: 300      // optional, max number of seconds to allow a stale object to be served
};
var TileJSON = require('tilelive-multicache')(options, require('tilejson'));

new TileJSON( ... )

The client option must be an object with the following methods;

  • set(key, ttl, value, callback)
  • get(key, callback)
  • error(err)

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published