When using entity_translation with beans, delete operations when using entitycache don't take effect until caches are cleared manually.

By extending the core bean controller, we can take advantage of entitycache in a more robust way. This would mean that other modules working w/ generic entities (like entity_translation) can further take advantage of entitycache when dealing with beans.

I'm working on a patch now.

Comments

gabesullice’s picture

Issue summary: View changes
gabesullice’s picture

StatusFileSize
new3.89 KB

Taken from my commit message. Forgot that patches strip these out.

Summary:

Add removeTranslation and add getEntityBid methods

Override removeTranslation() method in EntityTranslationBeanHandler
because it uses getEntityId(), which returns the bean delta, not bid.

Since entitycache uses the entity id as its cache id, not delta,
deleting a translation does not take effect until all caches are
cleared.

In order to get the proper id, a new method getEntityBid() is added for
use by the new removetranslation().

Last, for entitycache to be reset, we need to extend
BeanEntityAPIController resetCache to call entitycache's resetEntityCache.

gabesullice’s picture

Status: Active » Needs review
indytechcook’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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