swayok / alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea
MIT License
169 stars 26 forks source link

[Proposal] Lock support #15

Closed rogervila closed 3 years ago

rogervila commented 4 years ago

Hello,

I use this library to be able to run tests without relying on a redis connection.

Now I am facing a situation where I have to use atomic locks.

It would be nice to implement the LockProvider interface on AlternativeLaravelCache and use a filesystem lock strategy to implement Lock methods.

I can work on a PR if you find this useful.

swayok commented 4 years ago

@rogervila Hi. If you need this - someone will need it too. I'm not really understand what you actually need right now so PR would be the best way to add this functionality.

rogervila commented 4 years ago

Nice, I will work on it next week.

janich commented 4 years ago

I agree. This would really be helpfull to have, specially for the Redis cache store...

rogervila commented 4 years ago

I started a PR on Laravel but it was denied due a race condition. Once I have time I will work on it again. Then I will replicate the PR on this project to leverage the functionality

rogervila commented 4 years ago

Looks that lock support will be released soon. Let's look how the integration works.

https://twitter.com/taylorotwell/status/1326538435327270916?s=19

swayok commented 3 years ago

Implemented in 6.0 version. Thanks to @Malezha