We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to load cache by fallback in another fallback of load, script runs to infinity (maybe deadlock?)
public function runMethodWithCache() { $cachedValue1 = $this->cache->load('cached_value_1', function(& $dependencies) { $dependencies['expire'] = '+1 day'; $value = $this->runAnotherMethodWithCache(); return $value; }); } private function runAnotherMethodWithCache() { $usedValue = 'something'; $this->someValue = $this->cache->load('cached_value_2', function (& $dependencies) use ($usedValue) { $dependencies[Cache::ITEMS] = ['cached_value_1']; return $usedValue; }); return 'something another'; }
When I comment following lines from second method, script running as expected.
$this->someValue = $this->cache->load('cached_value_2', function (& $dependencies) use ($usedValue) { $dependencies[Cache::ITEMS] = ['cached_value_1']; return $usedValue; });
[UPDATE 1]: most probably, this is caused by cross dependency of Cache::ITEMS in second method, which is dependent on first one cache.
If subloading of cache is not possible, it should be inspect to avoid sub-loading of cache.
The text was updated successfully, but these errors were encountered:
This is imho expected behavior, dependencies must form directed acyclic graph.
Sorry, something went wrong.
Can you fix it and send a PR?
@dg I can try to fix it, but it will not be soon.
It is ok
No branches or pull requests
Description
When trying to load cache by fallback in another fallback of load, script runs to infinity (maybe deadlock?)
Steps To Reproduce
When I comment following lines from second method, script running as expected.
[UPDATE 1]: most probably, this is caused by cross dependency of Cache::ITEMS in second method, which is dependent on first one cache.
Idea
If subloading of cache is not possible, it should be inspect to avoid sub-loading of cache.
The text was updated successfully, but these errors were encountered: