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

Issue with initial caching using .find with include option together #9

Closed wcoppens closed 8 years ago

wcoppens commented 8 years ago

There seems to be a (initial) problem when using the caching feature with the include option of sequelize.

The problem: cachekeys differ in the first requests.

Use case:

Steps to reproduce: I've been debugging a lot and seem to have found the issue in the deeper objects of the includes used with the query. I can only confirm this issue using Postgres, other dbs have not been tested.

You can reproduce the issue using the following test: https://gist.github.com/wcoppens/fbc6fdbe5fbb76638e43

rfink commented 8 years ago

Hey there, thanks very much for bringing this to my attention. I'm quite busy mid-sprint right now, but I will definitely take a look at this as soon as I'm able. Thanks again.

rfink commented 8 years ago

Hello, so I've tested a small version of this using my existing unit test. I got a complaint when running circular references, have you tried installed "pg-native" as a dependency? Without it I got a warning plus the failed test, but with it everything passes. Can you give that a shot?

rfink commented 8 years ago

Going to close due to inactivity, please reopen if you continue to have issues after adding pg-native.