Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f461a7f

Browse files
Erlend Egeberg Aaslandpablogsal
Erlend Egeberg Aasland
andauthored
bpo-42862: Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module (GH-24203)
Co-authored-by: Pablo Galindo <[email protected]>
1 parent f3fa63e commit f461a7f

File tree

12 files changed

+77
-438
lines changed

12 files changed

+77
-438
lines changed

Doc/library/sqlite3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Module functions and constants
213213
The :mod:`sqlite3` module internally uses a statement cache to avoid SQL parsing
214214
overhead. If you want to explicitly set the number of statements that are cached
215215
for the connection, you can set the *cached_statements* parameter. The currently
216-
implemented default is to cache 100 statements.
216+
implemented default is to cache 128 statements.
217217

218218
If *uri* is true, *database* is interpreted as a URI. This allows you
219219
to specify options. For example, to open a database in read-only mode
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
:mod:`sqlite3` now utilizes :meth:`functools.lru_cache` to implement the
2+
connection statement cache. As a small optimisation, the default
3+
statement cache size has been increased from 100 to 128.
4+
Patch by Erlend E. Aasland.

Modules/_sqlite/cache.c

Lines changed: 0 additions & 344 deletions
This file was deleted.

0 commit comments

Comments
 (0)