webpro / dyson

Node server for dynamic, fake JSON.
837 stars 62 forks source link

Cannot disable cache #78

Closed dz902 closed 7 years ago

dz902 commented 7 years ago

The default option for cache was supposed to be false, but in console it still shows (cached), so I added "dyson.json" to API directory to manually set cache: false, but no luck, still seeing (cached).

Any idea about this? Thanks.

Also want to know whether disabling cache means the API file is reloaded every time a request comes in, so I can edit it on the fly without the need to restart dyson.

webpro commented 7 years ago
dz902 commented 7 years ago

Thanks for the tips!

We have a project where development is primarily driven by UI, i.e. UI guys would mock API needed then backend guys would deduce data model from the mock.

As UI is quite volatile, we are expecting a lot of trial and errors. A watcher-like mechanism to auto-reload the points / files would be very helpful.

Any plan to add this in the future?

webpro commented 7 years ago

I agree some kind of auto-reloader should be in. Until then, you can also use something like nodemon to watch your files and restart dyson on changes.

dz902 commented 7 years ago

Looking forward to it. Thanks.