mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(feeds): improve caching (#1191)
* feat(feeds): improve caching * fix(feeds): put cache if not empty * fix(feeds): reassign loop var * fix(feeds): enable busy_timeout again * fix(feeds): enable busy_timeout again
This commit is contained in:
parent
8c7c147328
commit
9793764905
6 changed files with 88 additions and 22 deletions
|
@ -27,9 +27,9 @@ func (db *DB) openSQLite() error {
|
|||
}
|
||||
|
||||
// Set busy timeout
|
||||
//if _, err = db.handler.Exec(`PRAGMA busy_timeout = 5000;`); err != nil {
|
||||
// return errors.New("busy timeout pragma: %w", err)
|
||||
//}
|
||||
if _, err = db.handler.Exec(`PRAGMA busy_timeout = 5000;`); err != nil {
|
||||
return errors.Wrap(err, "busy timeout pragma")
|
||||
}
|
||||
|
||||
// Enable WAL. SQLite performs better with the WAL because it allows
|
||||
// multiple readers to operate while data is being written.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue