My work on #468136: Nodequeue: Add test cases led me to this issue.

// load node queue with qid 1
$queue1 = nodequeue_load(1);

// $queue now contains a nodequeue object
// let's delete the nodequeue:
nodequeue_delete(1);

// and try to load it, bypassing the cache to make sure it's gone
$queue2 = nodequeue_load_queues(array(1), TRUE);

// at this point i would expect $queue2 to be NULL or empty; however, at this point $queue2 contains the nodequeue object with qid 1

The attached patch attempts to fix this by making sure the cache is actually bypassed when $bypass_cache is true.

CommentFileSizeAuthor
nodequeue_load_queues_fixed.patch2.28 KBwulff

Comments

ezra-g’s picture

Status: Active » Needs review

Thanks for posting a patch -- Marking as needs review.

ezra-g’s picture

Status: Needs review » Fixed

This resolves the malfunction while preserving cache functionality. Committed. Also, thanks for the clear testing instructions.

Thanks!

Status: Fixed » Closed (fixed)

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