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

[VUFIND-1505] Avoid cache-related out-of-memory exceptions. #2137

Merged
merged 1 commit into from Sep 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion module/VuFind/src/VuFind/View/Helper/Root/IconFactory.php
Expand Up @@ -70,8 +70,12 @@ public function __invoke(
}
$config = $container->get(\VuFindTheme\ThemeInfo::class)
->getMergedConfig('icons', true);
// As of release 1.1.0, the memory storage adapter has a flaw which can cause
// unnecessary out of memory exceptions when a memory limit is enabled; we
// can disable these problematic checks by setting memory_limit to -1.
$cacheConfig = ['name' => 'memory', 'options' => ['memory_limit' => -1]];
$cache = $container->get(\Laminas\Cache\Service\StorageAdapterFactory::class)
->createFromArrayConfiguration(['name' => 'memory', 'options' => []]);
->createFromArrayConfiguration($cacheConfig);
$helpers = $container->get('ViewHelperManager');
return new $requestedName(
$config,
Expand Down