Entity cache puts core entities into Drupal's cache API.

Due to the entity loading changes in Drupal 7, no core patches are required.

Don't bother using this module if you're not also going to use http://drupal.org/project/memcache or http://drupal.org/project/redis - the purpose of entitycache is to allow queries to be offloaded from the database onto alternative storage. There are minimal, if any, gains from using it with the default database cache.

How to use it

This module has no user interface, if you enable it, entities will start being cached, if you disable it, they'll stop.

Supported core entities

  • Nodes
  • Comments
  • Taxonomy terms
  • Taxonomy vocabularies
  • Files
  • Users

Support for contrib entities:

There is no automated support for contrib entities, to use entitycache for a contrib or custom entity:

  • Create a cache_entity_$myentity table/bin.
  • Specify EntityCacheDefaultEntityController as your controller class in hook_entity_info(), or extend it.
  • Never update your entity tables outside of save/delete API calls.

Tests

Entity cache is now set up for automated testing on Drupal.org, see current HEAD status.

This module is being developed for Drupal 7, and will never be backported to Drupal 6. For Drupal 6 you may want to look at this pressflow merge request or http://drupal.org/project/advcache.

Initial development of this module was partly sponsored by CivicActions and NowPublic.com.

Project Information

Downloads