-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Laracon 2024 #52710
Laracon 2024 #52710
Conversation
* @param array{ seconds?: int, owner?: string }|null $lock | ||
* @return TCacheValue | ||
*/ | ||
public function flexible($key, $ttl, $callback, $lock = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious what you think about calling this (or aliasing it to) Cache::throttle()
or Cache::debounce()
, since it is literally throttling/debouncing the refreshing of the cached value. Regardless can't wait to use it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another is why a 2-element array for ttl and not spreading it as, say, ($key, $ttlFresh, $ttlStale, ...)
* Concurrency Improvements 1. Add a working tests for Concurrency 2. Update composer.json to include replace `illuminate/concurrency` 3. Update PHP versions Signed-off-by: Mior Muhammad Zaki <[email protected]> * Apply fixes from StyleCI * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> * wip Signed-off-by: Mior Muhammad Zaki <[email protected]> --------- Signed-off-by: Mior Muhammad Zaki <[email protected]> Co-authored-by: StyleCI Bot <[email protected]>
return (new ServeFile( | ||
$disk, | ||
$config, | ||
$this->app->isProduction() | ||
))($request, $path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to resolve this via the container? That would allow for easier modification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you could use Storage::serveUsing(fn)
Hey @taylorotwell, thanks for such a fantastic Laracon! The I'm not sure if intentional, but the I presume it's intended that we only use Thanks a ton for this regardless :) |
@taylorotwell the PHP binary should definitely be configurable, we have a development server where you switch PHP per project basis and the global PHP is not the one that is used for the project and accessed via |
I wonder if Octane would have its own concurrency driver since Swoole/OpenSwoole have a feature called "task workers". I also heard that the number of threads an OS could have/handle is limited. Any possible cases of requests spawning too many threads causing performance issues? |
Also, you forgot to add the documentation blocks for the Competition facade. |
protected function forgetDuplicates(): self | ||
{ | ||
$this->callbacks = collect($this->callbacks) | ||
->reverse() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taylorotwell not sure, but I think we don't need the double reverse(), right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
I'm trying to call
Also it seems like How to configure this facade? |
Please open an issue if you have found a problem. Comments in already merged PRs are mostly not looked after. You can also send in a PR to fix the problem directly. |
I'm not sure if this is a issue. Maybe I'm just doing something wrong. |
What is the difference between the I see it's just a shorthand furthermore, I see that the job class is more proper for doing simple or complex actions! |
If the tradeoffs of using dispatch after response work in your favour, you should keep using it. |
No description provided.