Cache data for URIs
class UriCache constructor: (@cacheDir) ->
(None) |
Clear the whole cache
Name | Type | Description |
---|---|---|
cb | Function() |
clear : (cb)-> Fs.readdir @cacheDir, (err, relFiles) => Async.each relFiles, (relFile, done) => Fs.unlink Path.join(@cacheDir, relFile), done , cb
Retrieve data for a URI
Create cacheDir
unless it exists
initialize : (cb) -> MkdirP @cacheDir, cb