mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-09-21 03:55:22 -04:00
use a better query for evictOverflow
This commit is contained in:
1 file changed
+4
-2
Vendored
+4
-2
@@ -140,8 +140,10 @@ fn evictOverflow(self: *SqliteCache, conn: Conn) !void {
|
||||
|
||||
try conn.exec(
|
||||
\\ delete from cache
|
||||
\\ where url not in (
|
||||
\\ select url from cache order by stored_at desc limit $1
|
||||
\\ where rowid in (
|
||||
\\ select rowid from cache
|
||||
\\ order by stored_at desc
|
||||
\\ limit -1 offset $1
|
||||
\\ )
|
||||
, .{@as(i64, @intCast(limit))});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user