1
|
'use strict'
|
2
|
|
3
|
const ls = require('../ls.js')
|
4
|
const get = require('../get.js')
|
5
|
const put = require('../put.js')
|
6
|
const rm = require('../rm.js')
|
7
|
const verify = require('../verify.js')
|
8
|
const setLocale = require('../lib/util/y.js').setLocale
|
9
|
const clearMemoized = require('../lib/memoization.js').clearMemoized
|
10
|
const tmp = require('../lib/util/tmp.js')
|
11
|
|
12
|
setLocale('es')
|
13
|
|
14
|
const x = module.exports
|
15
|
|
16
|
x.ls = cache => ls(cache)
|
17
|
x.ls.flujo = cache => ls.stream(cache)
|
18
|
|
19
|
x.saca = (cache, clave, ops) => get(cache, clave, ops)
|
20
|
x.saca.porHacheo = (cache, hacheo, ops) => get.byDigest(cache, hacheo, ops)
|
21
|
x.saca.sinc = (cache, clave, ops) => get.sync(cache, clave, ops)
|
22
|
x.saca.sinc.porHacheo = (cache, hacheo, ops) => get.sync.byDigest(cache, hacheo, ops)
|
23
|
x.saca.flujo = (cache, clave, ops) => get.stream(cache, clave, ops)
|
24
|
x.saca.flujo.porHacheo = (cache, hacheo, ops) => get.stream.byDigest(cache, hacheo, ops)
|
25
|
x.sava.copia = (cache, clave, destino, opts) => get.copy(cache, clave, destino, opts)
|
26
|
x.sava.copia.porHacheo = (cache, hacheo, destino, opts) => get.copy.byDigest(cache, hacheo, destino, opts)
|
27
|
x.saca.info = (cache, clave) => get.info(cache, clave)
|
28
|
x.saca.tieneDatos = (cache, hacheo) => get.hasContent(cache, hacheo)
|
29
|
x.saca.tieneDatos.sinc = (cache, hacheo) => get.hasContent.sync(cache, hacheo)
|
30
|
|
31
|
x.mete = (cache, clave, datos, ops) => put(cache, clave, datos, ops)
|
32
|
x.mete.flujo = (cache, clave, ops) => put.stream(cache, clave, ops)
|
33
|
|
34
|
x.rm = (cache, clave) => rm.entry(cache, clave)
|
35
|
x.rm.todo = cache => rm.all(cache)
|
36
|
x.rm.entrada = x.rm
|
37
|
x.rm.datos = (cache, hacheo) => rm.content(cache, hacheo)
|
38
|
|
39
|
x.ponLenguaje = lang => setLocale(lang)
|
40
|
x.limpiaMemoizado = () => clearMemoized()
|
41
|
|
42
|
x.tmp = {}
|
43
|
x.tmp.mkdir = (cache, ops) => tmp.mkdir(cache, ops)
|
44
|
x.tmp.hazdir = x.tmp.mkdir
|
45
|
x.tmp.conTmp = (cache, ops, cb) => tmp.withTmp(cache, ops, cb)
|
46
|
|
47
|
x.verifica = (cache, ops) => verify(cache, ops)
|
48
|
x.verifica.ultimaVez = cache => verify.lastRun(cache)
|
49
|
x.verifica.últimaVez = x.verifica.ultimaVez
|