This package has been deprecated

Author message:

This module has moved: please install @mapbox/tilelive-memcached instead

tilelive-memcached

1.0.1 • Public • Published

Build Status

tilelive-memcached

node-tilejson wrapping source for tilelive.

var options = {
    mode: 'readthrough', // optional, cache mode either 'readthrough' or 'race'
    client: client, // optional, instantiated memcached client
    expires: 600    // optional, object expiration time in seconds
    ttl: 300        // optional, relay mode only, numbe of seconds before an object should be re-checked.
};
var TileJSON = require('tilelive-memcached')(options, require('tilejson'));

new TileJSON( ... )

Cache modes

Two modes for caching are available.

  • readthrough hits memcached first and only calls a get on the original source if a cache miss occurs.
  • race always hits both memcached and the original source concurrently. The IO operation that completes fastest will handle the get call. After both operations are complete the cache may be updated if the original source's contents have changed.

Readme

Keywords

none

Package Sidebar

Install

npm i tilelive-memcached

Weekly Downloads

2

Version

1.0.1

License

none

Last publish

Collaborators

  • mapbox-admin