Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity CRUD API - main
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2010 at 17:56 UTC
Updated:
14 Dec 2010 at 15:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
amitaibuAnd this time, with the correct patch.
Comment #2
fagoUsually this is not necessary, due to the way php5 deals with objects. If there is a static the cache, the object in the cache is the same as the updated one - thus any changes should be already there. However, this is indeed problematic if you have an entity serialized, e.g. form storage and do an update then + in some other cases as well.
The same issue applies to core though, at least for node_save(). See the related issue #651240: Allow modules to react to changes to an entity.
Comment #3
fagoI just ran over another issue with the static cache: Clearing the cache in the delete hook doesn't properly work, e.g. calling menu_rebuild() - as in the hook the static cache is still available. That already caused issues in profile2.
The same though applies to the 'insert' and 'update' hooks - the changes should already be applied once the hooks are invoked. Thus we need to clear the cache before invoking the hook.
Follow-up: Create an issue to fix static-cache clears in core.