I’m studying sqlite features and I’ve discovered the SQLite Shared-Cache Mode which is disabled by default.
Shared-Cache is:
intended for use in embedded servers
because it shares a single data and schema cache between threads or processes.
I’m interested in using sqlite (with shared-cache) in PHP (and Python) so my questions are:
1) is every PDO connection in a PHP script to an sqlite DB considered a single isolated connection?
2) if yes, using Shared-Cache Mode could improve performance in an high concurrency scenario; to activate Shared-Cache Mode one have to call this C function:
int sqlite3_enable_shared_cache(int);
how to call that function through PDO?
It seems almost impossible but maybe there is a solution.
Best Regards,
Fabio Buda
Web Developer/Designer @ netdesign
I’ve searched through the PHP source code to find an answer for you. No file in
ext/pdo_sqlite/is ever calling thesqlite3_enable_shared_cachefunction, which means this is not implemented.