While coding the voting API integration over here: #865462: Voting API I've stumbled into an issue:

Voting API integration generates records in a particular cache segment, and votes may or may not be on nodes or comments. Basically the node plugin would need knowledge of the votingapi plugin to be able to insert into the cache segment at the same time, if it doesn't then when searching for the latest timestamp, and all the cache segments are AND'd together, nothing will be found.

I think we need to allow some cache segments to be OR'd together, so that we'd lose the ability to say find the latest vote on a 'page' node, but we'd always have the ability to find the latest vote or the latest 'page' node timestamp.

Comments

steven jones’s picture

I guess we only need to worry about selecting the correct timestamp, not insertion. So just need to cleverly AND/OR the where clauses together, rather than just ANDing them together. I think plugins should decide if they can be AND'd or OR'd together.

steven jones’s picture

Status: Active » Needs review
StatusFileSize
new9.93 KB

Patch attached.

steven jones’s picture

StatusFileSize
new10.17 KB

Add some more docs.

steven jones’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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