Alternative to the deprecated pragma sqlite "default_cache_size"

The sqlite docs indicate that use pragma default_cache_sizeis deprecated. I looked, but I could not understand why. Is there a reason for this? I am working on a python firmware and we open and close connections a lot. Is the only use alternative pragma cache_sizefor every database connection?

+5
source share
1 answer

Since Firefox makes extensive use of SQLite, I won’t be surprised if this request comes from their camp in order to prevent any interference from third parties (for example, "interception" with large / small / invalid / unclear values) using this kind of pragma through all database connections

Therefore, I am firmly convinced that there is no alternative and you really need to install cache_sizefor each connection to the database

+2
source

All Articles