UNPKG

orange-orm

Version:

Object Relational Mapper

13 lines (11 loc) 405 B
var tryGetFromCacheById = require('./tryGetFromCacheById'); var tryGetFromDbById = require('./tryGetFromDbById'); var resultToPromise = require('./resultToPromise'); function get() { var cached = tryGetFromCacheById.apply(null,arguments); if (cached) return resultToPromise(cached); return tryGetFromDbById.apply(null,arguments); } get.exclusive = tryGetFromDbById.exclusive; module.exports = get;