Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Cannot disable cache #78

Closed
dz902 opened this issue Mar 2, 2017 · 4 comments
Closed

Cannot disable cache #78

dz902 opened this issue Mar 2, 2017 · 4 comments

Comments

@dz902
Copy link

dz902 commented Mar 2, 2017

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
Copy link
Owner

webpro commented Mar 2, 2017

  • It is indeed false by default. Except for GET endpoints, so this should be documented properly.
  • Caching is configured per endpoint, so you should set cache: false for the specific endpoint(s).
  • The configuration is not reloaded automatically. Unfortunately, there's no option to reload dyson or endpoint(s) automatically on each change.

@dz902
Copy link
Author

dz902 commented Mar 6, 2017

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
Copy link
Owner

webpro commented Mar 6, 2017

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
Copy link
Author

dz902 commented Mar 7, 2017

Looking forward to it. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants