Skip to content

[Cache] fix cleanup of expired items for PdoAdapter #23326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

dmaicher
Copy link
Contributor

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #23313
License MIT
Doc PR -

This fixes the query being executed to cleanup expired items from the cache_items table using the PdoAdapter.

I also added a test case to make sure we do the cleanup successfully.

* @throws InvalidArgumentException When namespace contains invalid characters
* @throws \InvalidArgumentException When first argument is not PDO nor Connection nor string
* @throws \InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION
* @throws \InvalidArgumentException When namespace contains invalid characters
Copy link
Contributor

Choose a reason for hiding this comment

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

These were OK ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah you are right! Did not see the use Symfony\Component\Cache\Exception\InvalidArgumentException 😋

@dmaicher dmaicher force-pushed the cache-pdo-cleanup-fix branch from 6fd9516 to c183b0e Compare July 1, 2017 10:17
@fabpot
Copy link
Member

fabpot commented Jul 3, 2017

Thank you @dmaicher.

@fabpot fabpot merged commit c183b0e into symfony:3.2 Jul 3, 2017
fabpot added a commit that referenced this pull request Jul 3, 2017
…her)

This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] fix cleanup of expired items for PdoAdapter

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #23313
| License       | MIT
| Doc PR        | -

This fixes the query being executed to cleanup expired items from the `cache_items` table using the `PdoAdapter`.

I also added a test case to make sure we do the cleanup successfully.

Commits
-------

c183b0e [Cache] fix cleanup of expired items for PdoAdapter
This was referenced Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants