reyesoft / ngx-jsonapi

JSON API client library for Angular 5+ 👌 :: Production Ready 🚀
https://ngx-jsonapi.reyesoft.com/
MIT License
101 stars 52 forks source link

How to disable all caching? #130

Closed peavers closed 5 years ago

peavers commented 5 years ago

The caching mechanism seems pretty buggy around relationships and removal/add operations. I'd like to fully disable any caching but I don't see a flag for it?

iamchrismiller commented 5 years ago

There is a configuration object that you can configure in the root of your application.

JsonapiConfig (https://github.com/reyesoft/ngx-jsonapi/blob/cd063ec3058898a0604c268f3188694495c0122a/src/jsonapi-config.ts)

We removed all caching with the following configuration:

    NgxJsonapiModule.forRoot({
      url: '/',
      cache_prerequests: false,
      cachestore_support: false
    })
xaun commented 5 years ago

@iamchrismiller objects are still set to cachememory with this disabled, and on versions 1.1.0, cachememory is really buggy - not sure if this has been fixed on later versions, but I don't really want to invest any more time on this library to confirm / investigate.

wojo1206 commented 5 years ago

Cache in ^2.0.0-rc.4 can be successfully disabled.