Problem/Motivation

Currently sps_sps_reaction_plugins() uses module_invoke_all('entity_info') to fetch all available entity types. Unfortunately we can't use entity_get_info() because this could lead to nested calls to entity_get_info() (sps_sps_reaction_plugins() can be triggered by a call to entity_get_info()).
The problem with all this is, that module_invoke_all('entity_info') can be quite expensive performance wise.

Proposed resolution

Check if the persistent cache of entity info is available and just use module_invoke_all('entity_info') if the cache isn't ready yet.
We can't use the static cache of entity_get_info() as this is progressively built and we don't know if it is complete yet.
This way we should be able to re-use the cached data of entity_get_info() most of the time.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo