Closed crcatala closed 7 years ago
Good catch and thanks for reporting. I fixed this together with a planned improvement. Rather than leaving it to the consumer (query-cache/entity-store) to decide what an undefined ttl (and other fields) means, I'm setting the defaults initially (in the builder):
Code: https://github.com/petercrona/ladda/blob/master/src/builder.js#L19 Test: https://github.com/petercrona/ladda/blob/master/src/builder.spec.js#L108
@petercrona awesome, appreciate the work your doing on this. good stuff!
When setting ttl value to
0
, was expecting requests to appear not to be cached at all since the ttl was very small. Looks like it's defaulting back to the300
seconds. I admit this is a weird scenario to set to0
, since that would mean bypassing the the caching altogether which a user probably would not do.https://github.com/petercrona/ladda/blob/2b937889bcf021cf374bdf9d565afad5841dd14e/src/decorator/read.js#L12