0.7.2 • Published 5 years ago
tilelive-cache v0.7.2
tilelive-cache
I am a caching wrapper for
tilelive.js
. I cache both sources
and data produced by their respective getTile()
functions.
Usage
var tilelive = require("tilelive"),
cache = require("tilelive-cache")(tilelive, {
size: 10, // 10MB cache (the default)
sources: 6 // cache a maximum of 6 sources (the default); you may
// need to change this if you're using lots of
// composed sources
});
// ...
// initializes or loads a tilelive-mapnik source
cache.load("mapnik://./stylesheet.xml", function(err, source) {
// ...
// generates or loads a tile from the cache
return source.getTile(12, 1213, 1491, function(err, data, headers) {
// ...
});
});
To warm the cache, call load()
without a callback:
cache.load("mapnik://./stylesheet.xml");
0.7.2
5 years ago
0.7.1
9 years ago
0.7.0
9 years ago
0.6.5
9 years ago
0.6.4
9 years ago
0.6.3
9 years ago
0.6.2
9 years ago
0.6.1
9 years ago
0.6.0
9 years ago
0.5.2
9 years ago
0.5.1
10 years ago
0.5.0
10 years ago
0.4.5
10 years ago
0.4.4
10 years ago
0.4.3
10 years ago
0.4.2
11 years ago
0.4.1
11 years ago
0.4.0
11 years ago
0.3.0
11 years ago
0.2.2
11 years ago
0.2.1
11 years ago
0.2.0
11 years ago
0.1.2
11 years ago
0.1.1
11 years ago
0.1.0
11 years ago