1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-27 23:28:38 +02:00
This commit is contained in:
Laurent Cozic
2020-10-16 16:14:39 +01:00
parent e3a37ec2d6
commit 4e303be85f
24 changed files with 55 additions and 3319 deletions

View File

@ -36,7 +36,7 @@ export default class Cache {
private checkExpiredRecords() {
const now = Date.now();
for (let key in this.expirableKeys_) {
for (const key in this.expirableKeys_) {
if (!this.records_[key]) {
delete this.expirableKeys_[key];
} else {
@ -68,7 +68,7 @@ export default class Cache {
this.records_[key] = {
value: value,
expiredTime: ttl ? Date.now() + ttl : 0,
}
};
const idx = this.recordKeyHistory_.indexOf(key);
if (idx >= 0) this.recordKeyHistory_.splice(idx, 1);