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 an Entity is loaded from the DB, it is stored in Drupals cache. The cache may exceed the allowed maximum memory.
The following function should reclaim memory of entities, which were loaded but are not required anymore.
function attemptMemoryReclaim() { // First, try resetting Drupal's static storage - this frequently releases plenty of memory to continue. drupal_static_reset(); // Entity storage can blow up with caches so clear them out. $manager = \Drupal::entityManager(); foreach ($manager->getDefinitions() as $id => $definition) { $manager->getStorage($id)->resetCache(); } return memory_get_usage(); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When an Entity is loaded from the DB, it is stored in Drupals cache.
The cache may exceed the allowed maximum memory.
The following function should reclaim memory of entities, which were loaded but are not required anymore.
The text was updated successfully, but these errors were encountered: