If a class file is not found, the apc class loader will cache NULL. This can cause fatals which make it impossible to clear the cache from the UI, and require manual deletion of the variable from the apc cache.

CommentFileSizeAuthor
#1 2087519-xautoload-apc-null.patch560 byteswodenx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wodenx’s picture

Patch attached.

wodenx’s picture

Status: Active » Needs review
donquixote’s picture

This stuff is copied or "inspired" from the Symfony ApcClassLoader.
https://github.com/symfony/ClassLoader/blob/master/ApcClassLoader.php#L120

When I did that, I was not really sure myself whether caching of NULL values is a good idea.
There are situations imaginable where this causes a problem.

If you say this is causing real-world issues in Drupal, then it is probably time to change it.

donquixote’s picture

This is going to be fixed in the upcoming 7.x-4.x branch.

donquixote’s picture

Issue summary: View changes
Status: Needs review » Fixed

And it is actually fixed in 7.x-3.4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit fb2fb9e on 7.x-3.x, 7.x-4.x, 7.x-5.x authored by wodenx, committed by donquixote:
    Fix #2087519 - APC Class loader can cache null values.