1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-01-06 15:30:30 +00:00

Increase sqlite calibre cache

This commit is contained in:
Webysther Sperandio 2024-10-23 22:22:50 +02:00 committed by GitHub
parent cd01aaa69e
commit 366a65f99f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -621,6 +621,7 @@ class CalibreDB:
connect_args={'check_same_thread': False},
poolclass=StaticPool)
with check_engine.begin() as connection:
connection.execute(text('PRAGMA cache_size = 10000;'))
connection.execute(text("attach database '{}' as calibre;".format(dbpath)))
connection.execute(text("attach database '{}' as app_settings;".format(app_db_path)))
local_session = scoped_session(sessionmaker())
@ -658,6 +659,7 @@ class CalibreDB:
connect_args={'check_same_thread': False},
poolclass=StaticPool)
with cls.engine.begin() as connection:
connection.execute(text('PRAGMA cache_size = 10000;'))
connection.execute(text("attach database '{}' as calibre;".format(dbpath)))
connection.execute(text("attach database '{}' as app_settings;".format(app_db_path)))