javascriptjsdatajs-data-angular

js-data: What is the difference between "none" and "inject" for DS "reapAction" configuration option?


I have the following definitions:

The above definition is taken from the official documentation. I don't understand what's the point of re-injecting items back into the DS? To a consumer of the resource, how does it differ from doing nothing?

At first impression, I thought re-injecting would update the lastModified timestamp but it doesn't, as verified by running a sample app.


Solution

  • Sorry, but the documentation was misleading, and has now been fixed.

    What the reap method's inject option actually does is reset expired items' expiry timeout to the value of the maxAge option, whereas the none option does not.