Skip to content
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

[Nette 3.1] The save() method does not accept callable anymore #5318

Closed
TomasVotruba opened this issue Jan 25, 2021 · 3 comments · Fixed by #5409
Closed

[Nette 3.1] The save() method does not accept callable anymore #5318

TomasVotruba opened this issue Jan 25, 2021 · 3 comments · Fixed by #5409
Assignees
Labels

Comments

@TomasVotruba
Copy link
Member

TomasVotruba commented Jan 25, 2021

See nette/caching@5ffe263#diff-c3abbeb8a7d04b072c4f38e38e10d763123f5503f1719f852ec21e1602c4c4db

-$result = $this->cache->save($key, function () {
-    return $this->getSomeHeavyResult();
-});

+$result = $this->getSomeHeavyResult();
+$this->cache->save($key, $result);
@lulco
Copy link
Contributor

lulco commented Jan 25, 2021

I have never used it :) callback in load function yes, but save?

@TomasVotruba
Copy link
Member Author

What's not forbidden... :)

That's from one of Nette project I work on.

@TomasVotruba TomasVotruba self-assigned this Feb 2, 2021
@TomasVotruba
Copy link
Member Author

I'm on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants