Skip to content

[DEBT] Use asyncRemember #632

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

Open
SMEWebify opened this issue Mar 6, 2025 · 0 comments
Open

[DEBT] Use asyncRemember #632

SMEWebify opened this issue Mar 6, 2025 · 0 comments
Labels
php Pull requests that update Php code Reduce technical debt Facilitates long-term thinking

Comments

@SMEWebify
Copy link
Owner

need update laravel 12 befor

Before Update:

use Illuminate\Support\Facades\Cache;
// Caching a user
$user = Cache::remember('user_'.$id, 600, function () use ($id) {
    return User::find($id);
});

After Update:

use Illuminate\Support\Facades\Cache;
// Utilizing the new async caching API
$user = Cache::asyncRemember('user_'.$id, 600, function () use ($id) {
    return User::find($id);
});
@SMEWebify SMEWebify added this to WEM Mar 6, 2025
@SMEWebify SMEWebify added Reduce technical debt Facilitates long-term thinking php Pull requests that update Php code labels Mar 6, 2025
@SMEWebify SMEWebify moved this to Backlog in WEM Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
php Pull requests that update Php code Reduce technical debt Facilitates long-term thinking
Projects
Status: Backlog
Development

No branches or pull requests

1 participant