Skip to content

Commit

Permalink
Merge branch 'main' into sqlite-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag authored Jan 21, 2025
2 parents 3ba69e8 + a364e7c commit a248b67
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions lib/cache/sqlite-cache-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ module.exports = class SqliteCacheStore {
etag = ?,
cacheControlDirectives = ?,
cachedAt = ?,
staleAt = ?,
deleteAt = ?
staleAt = ?
WHERE
id = ?
`)
Expand All @@ -189,9 +188,8 @@ module.exports = class SqliteCacheStore {
cacheControlDirectives,
vary,
cachedAt,
staleAt,
deleteAt
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
staleAt
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
`)

this.#deleteByUrlQuery = this.#db.prepare(
Expand Down Expand Up @@ -278,7 +276,6 @@ module.exports = class SqliteCacheStore {
value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,
value.cachedAt,
value.staleAt,
value.deleteAt,
existingValue.id
)
} else {
Expand All @@ -296,8 +293,7 @@ module.exports = class SqliteCacheStore {
value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null,
value.vary ? JSON.stringify(value.vary) : null,
value.cachedAt,
value.staleAt,
value.deleteAt
value.staleAt
)
}
}
Expand Down Expand Up @@ -332,7 +328,7 @@ module.exports = class SqliteCacheStore {
callback()
},
final (callback) {
store.set(key, { ...value, body })
store.set(key,
callback()
}
})
Expand Down

0 comments on commit a248b67

Please sign in to comment.