rfink / sequelize-redis-cache

Small fluent interface for caching sequelize database query results in redis more easily
MIT License
174 stars 47 forks source link

Support for findAndCount, perhaps others #13

Closed mccloud-jeff closed 8 years ago

mccloud-jeff commented 8 years ago

I needed support for findAndCount, but your dynamically bound list of methods only includes findAndCountAll.

var methods = [
  'find',
  'findOne',
  'findAll',
  'findAndCountAll',
  'all',
  'min',
  'max',
  'sum',
  'count'
];

I added in 'findAndAcount',manually and it appears to work as expected. Is there a reason for excluding this method and/or others? Could this support be added? (need a PR?)

Thanks!

rfink commented 8 years ago

Hello, I believe when I wrote this, findAndCount wasn't a thing yet. I could be mistaken, but I don't believe there's any technical limitation leaving it out. If you'd like to make a PR, that would be great! Love contributions. If not, I can make a note to add it.

mccloud-jeff commented 8 years ago

OK great, will do a PR soon!

rfink commented 8 years ago

This is added in 1.3.0. Thanks!