Skip to content

Conversation

@chrisnetonline
Copy link
Contributor

@chrisnetonline chrisnetonline commented Nov 28, 2025

In very high throughput applications that rely on the database driver for cache locks, the expiration cleanup starts to result in high lock wait times because there is no index on the expiration column.

This pull request adds an index to the table create migration stub for the cache and cache_locks tables.

Before adding index (these stats are over a 15 min period):
Screenshot 2025-11-28 at 10 03 30 AM

After adding index (at 10:13):
image

@taylorotwell taylorotwell merged commit 4b881cf into laravel:12.x Nov 28, 2025
76 checks passed
@chrisnetonline chrisnetonline deleted the fix/add-cache-expiration-index branch November 28, 2025 16:56
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