SQLite Forum

Regarding initialization of sqlite_pcache_method2

Regarding initialization of sqlite_pcache_method2

(1) By Vijay (Vijay_123) on 2022-01-27 09:15:11 [link] [source]

Hi All,

Can any one let me know how to initialize the structure sqlite_pcache_method2?

And if I want to initialize sqlite3 for page cache mechanism how to do that? What and all parameters i should initialize?

Thanks in advance...

(2) By Gunter Hick (gunter_hick) on 2022-01-27 11:06:55 in reply to 1 [source]

SQLite already has a page cache. But you may build your own.

See https://sqlite.org/c3ref/pcache_methods2.html

You need to initialize all members of the structure with the addresses of your routines that provide the required services. Then call sqlite3_config as stated on the linked page.

Configuring SQLite to use MEMSYS5 is probably a very much simpler way to limit the size of the page cache.