Skip to content

Conversation

Gaitholabi
Copy link
Contributor

Issue:

When using the file driver, upon executing php artisan cache:clear or calling \Cache::flush();, all locks are cleared.

Similar to what other drivers offer, this PR adds the ability to define a separate directory for Locks when using the file driver.

Example:

 'file' => [ 'driver' => 'file', 'path' => storage_path().'/framework/cache', 'lock_path' => storage_path().'/framework/lock', ], 
  • Backward compatible, not adding the lock_path config would yield the same result as before
  • Makes the FileStore driver more consistent with other drivers namely RedisStore and Database store
@Gaitholabi Gaitholabi marked this pull request as ready for review April 17, 2023 20:00
Gaitholabi and others added 2 commits April 18, 2023 11:38
Co-authored-by: Dries Vints <dries@vints.be>
@Gaitholabi Gaitholabi requested a review from driesvints April 18, 2023 08:55
@taylorotwell taylorotwell merged commit 7aab67d into laravel:10.x Apr 18, 2023
milwad-dev pushed a commit to milwad-dev/framework that referenced this pull request May 12, 2023
* allow separate directory for locks on filestore * fix style * fix method signature * Update src/Illuminate/Cache/FileStore.php Co-authored-by: Dries Vints <dries@vints.be> * apply styleci * formatting --------- Co-authored-by: Dries Vints <dries@vints.be> Co-authored-by: Taylor Otwell <taylor@laravel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants