Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
recursive memoize
var express = require('express')
, memoize = require('memoize')
, cache = require('chaos')('cache')
, Beatport = require('beatport')
memoize.set('debug', true)
var bp = memoize('beatport-mem', memoize('beatport', Beatport({ perPage: 10, sortBy: 'releaseDate desc' }), {
expire: 1000 * 60 * 60 * 24
, store: cache
}), {
expire: 1000 * 60 * 60
})
, artists = memoize('artists', cache.mount('artists'), { expire: 1000 * 60 * 60, exclude: [ 'set' ] })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.