Questions tagged [sails-redis]

Sails/Waterline adapter for Redis.

Redis Sails/Waterline Adapter

A Sails/Waterline adapter for Redis. May be used in a Sails app or anything using Waterline for the ORM.

This waterline-redis stores indexes of unique attributes for relatively fast lookups. Collections with multiple unique constraints will create multiple index sets.

11 questions
2
votes
0 answers

Sails redis connection remains open

I have a backend project written with Sails which connects a model to Redis via sails-redis module. When trying to run Mocha tests the connection to Redis does not seem to close along with the test-run application and when a test suite is ended and…
Vee6
  • 1,527
  • 3
  • 21
  • 40
2
votes
1 answer

View Caching in SailsJS

I've got a highly trafficed website and I'm using Sails for a specific conponent on a page. However the information doesn't change that often, maybe once per day. I'm wondering if there is a way to do view caching? Ideally using a key/store like…
Bill Billingson
  • 353
  • 4
  • 8
1
vote
1 answer

What is the downside of using localDisk as storage means in Sails project

I am trying to decide what database to use in a Sails project. I started with localDisk and it works fine. I wonder why a database like Postgres or Mongo is needed. Could someone explain to me? Also since waterline abstracted the underlying…
windchime
  • 1,253
  • 16
  • 37
1
vote
1 answer

How do to call EXPIRE command for a Redis record using Sails

I'm using Sails to add some data to Redis... It is working OK but I'm not sure how to set the EXPIRE for a key... Im using the sails-redis adapter/connection for the model... My model looks like this module.exports = { connection: 'cache', …
mickey
  • 101
  • 9
1
vote
1 answer

sails-redis: increment attributes values

I'd like to use sails-redis to track all kinds of events. Therefore I need the ability to increment model attributes in a performant way. I already found the Model.native function, wich allows me to access the native redis methods. But since…
HaNdTriX
  • 28,732
  • 11
  • 78
  • 85
0
votes
0 answers

Add new values to Sails session

Updating the session object with a new value is not working in sails. showBrowsePage: function(req, res) { // If not logged in set `me` property to `null` and pass tutorials to the view if (!req.session.userId) { return…
May13ank
  • 548
  • 2
  • 9
  • 24
0
votes
1 answer

serverside subscribe to model in sails

in my favorite scenario, I have mutliple dynamic nodes running a identical sails.js app. The nodes need to send messages each other. I try to archieve this through a redis db with a node model. Each server subscribes to all models and creates one…
twinkie
  • 31
  • 6
0
votes
2 answers

running background job on a specific action in sails js

i am trying to make a service that runs in background when specific event happens. As an example when user verifies email i want my service of deleting possible unverified duplicate emails form database. i tried using kue to save my purpose but i…
Newbiee
  • 592
  • 6
  • 22
0
votes
1 answer

I want to store some credentials in the session at the time when server lifts in Sails

I am using Sails and Postgres and I want to save some credentials in the session at the start-up of server. Kindly help me. How can I do this, and is there any possibilities that it may give some error just because of database connectivity with the…
0
votes
3 answers

sails waterline sort on number not working(sails-redis)

I am trying to do sort id Modal: module.exports = { autoPK: false, attributes: { id: { type: 'integer', autoIncrement:true, primaryKey: true }, } } Query: mymodal.find().sort({id:…
Max
  • 71
  • 9
0
votes
1 answer

Multiple database connections with sailsjs

It's possible to have a mysql connect for each registered and authenticated client ? For example: I need to have a different database for each client and I wonder if you can do this with the sailsjs.
João Silva
  • 167
  • 2
  • 9