0.0.4 • Published 10 years ago

fs-cache v0.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
10 years ago

Streamable filesystem cache

npm install fs-cache

Usage

fscache = require 'fs-cache'
request = require 'request'

cache = fscache '/tmp/mrdka'


cachedUrlStream = (url) ->
	return cache.get(url, expire: 5) if cache.exists url
	r = request(url)
	r.pipe cache.put(url, expire: 5)
	r


url = 'http://google.com'
cachedUrlStream(url).pipe process.stdout
0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago