UNPKG

@roots/bud-api

Version:

bud.js core module

17 lines (16 loc) 520 B
import { Bud } from '@roots/bud-framework'; import isString from '@roots/bud-support/isString'; export const persist = function (type = `filesystem`) { if (type === false) { this.cache.enabled = false; this.api.logger.log(`bud.cache:`, `disabled`); return this; } this.cache.enabled = true; this.api.logger.log(`bud.cache:`, `enabled`); if (isString(type)) { this.cache.type = type; this.api.logger.log(`bud.cache:`, `set to`, type); } return this; };