Skip to content

Commit 7d3a30b

Browse files
committed
FE-256-fix-force-ttl-0 auto-commit
1 parent 9180a7e commit 7d3a30b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
99
### Fixed
1010

1111
- when ttl 0 was set, a request to the server was not made again, it brought it from memory, it was corrected in the isLive function of common.
12+
1213
## [2.2.1] - 2020-10-17
1314

1415
### Fixed

src/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Resource } from './resource';
77
export function isLive(cacheable: ICacheable, ttl?: number): boolean {
88
let ttl_in_seconds = typeof ttl === 'number' ? ttl : cacheable.ttl || 0;
99

10-
return Date.now() <= cacheable.cache_last_update + ttl_in_seconds * 1000;
10+
return Date.now() < cacheable.cache_last_update + ttl_in_seconds * 1000;
1111
}
1212

1313
// @todo test required for hasMany and hasOne

0 commit comments

Comments
 (0)