Needs work
Project:
Entity index
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2014 at 21:54 UTC
Updated:
9 Jun 2014 at 19:03 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexander allen commentedThis is a "cheap" cleanup proof-of-concept. The client calls entity_index_cleanup("entity_type") and we remove the tables based on our internal table naming convention.
As you'll see on the "dirty" patch (it has commented out stuff), there is a comment fro drupal_get_schema_unprocessed("entity_index_{$entity_type}"). That returned nothing, don't know why, but I am not sure that sort of advanced metadata is needed?
One thing I am concerned about though are bundles and the Field API.
If we needed to take these into consideration, something like this would take care of deleting bundles and fields cleanly. Again, not sure if or where it would be implemented:
Comment #2
alexander allen commentedMissing some information on that last patch.
Comment #3
erikwebb commented@Alexander Allen - I'd like to keep this logic in the main entity_index module, so that any new entity implementations are simpler. I personally think the method that Entity API uses to integrate with Entity Cache method is pretty clean and consolidates the code as much as possible. #2017685: Automatically create cache tables for entities that want to support entitycache.module
Comment #4
alexander allen commentedHey @erikwebb, I'll take a look at the Entity API + Entity Cache integration then will discuss here any ideas that come up. Thanks.