Skip to content

Instantly share code, notes, and snippets.

@christianstrang
christianstrang / cache-write.js
Last active May 22, 2019 14:41
sailsjs helper to easily save data in cache
var util = require('util');
module.exports = {
friendlyName: 'Cache write',
description: 'used to save data into cache using a key and a TTL in seconds until the cache expires the data.',
inputs: {
key: {
@christianstrang
christianstrang / datastores.js
Created May 22, 2019 14:09
config for my cache adapter in sailsjs
...
cache: {
adapter: 'sails-redis',
url: 'redis://localhost:6379',
},
...