Closed (fixed)
Project:
Entityqueue
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
13 Mar 2016 at 20:52 UTC
Updated:
14 May 2016 at 16:54 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
grimreaperEditing git repository URL.
Comment #3
krlucas commentedThere are two potential caches that EntityQueue needs to be aware of, the Views result cache (the "Cache" setting in the View's UI) and the Drupal render cache.
I haven't been able to successfully figure out where the Views relationship or sort plug-ins for entityqueue would provide the proper cache tags.
But I did create a hook in a custom module that adds cache tags to the View's render array so that the render cache is invalidated when an entityqueue is saved. For this to work the View has to be configured with (results) Cache = None.
Comment #4
amateescu commentedThat's because Views cache plugins do not take into account possible cache tags that could be provided by other views handlers (relationship, filter, etc.) :/ I opened a core issue for this #2710679: Views handlers should be able to add cache tags to the views results cache and implemented a workaround for now: invalidate the
<target_entity_type>_listcache tag when a subqueue is updated.Comment #6
amateescu commentedCommitted and pushed to 8.x-1.x.
Comment #7
sdstyles commentedThe method
$target_entity_type->getListCacheTags()already returns an array of strings, so we don't need to force it to be an array, as result this throws an error inmergeTags()because tag is an array not a string, see the screenshot with error.Comment #9
amateescu commentedOops, that's right :) Committed the followup patch, thanks!
Comment #10
grimreaperThanks for the patches. It works well.