Skip to content

Add support for opening sqlite db with shared cache#16189

Merged
markstory merged 1 commit into4.nextfrom
sqlite-cache
Dec 14, 2021
Merged

Add support for opening sqlite db with shared cache#16189
markstory merged 1 commit into4.nextfrom
sqlite-cache

Conversation

@othercorey
Copy link
Copy Markdown
Contributor

@othercorey othercorey commented Dec 13, 2021

@othercorey othercorey added this to the 4.3.3 milestone Dec 13, 2021
$params[] = 'cache=' . $config['cache'];
}
if ($config['mode']) {
$params[] = 'mode=' . $config['mode'];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does mode do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.sqlite.org/uri.html Section 3.3

There is a memory mode that let's you name the db but act like :memory: so you can create multiple in-memory dbs.

@othercorey
Copy link
Copy Markdown
Contributor Author

I tried creating a params config, but it's very difficult to configure an array of key/value pairs through DSN format.

@othercorey othercorey changed the base branch from 4.x to 4.next December 13, 2021 19:08
@othercorey othercorey modified the milestones: 4.3.3, 4.4.0 Dec 13, 2021
@othercorey othercorey marked this pull request as ready for review December 13, 2021 21:12
@markstory
Copy link
Copy Markdown
Member

I tried creating a params config, but it's very difficult to configure an array of key/value pairs through DSN format.

I think the unprefixed keys are generally a better design as it is easier to remember and operate.

@markstory markstory merged commit fe61d0b into 4.next Dec 14, 2021
@markstory markstory deleted the sqlite-cache branch December 14, 2021 04:05
markstory added a commit to cakephp/docs that referenced this pull request Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants