bypass_cache in nodequeue_load_queues() doesn't behave as expected

wulff - May 26, 2009 - 12:47
Project:Nodequeue
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

My work on #468136: 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.

AttachmentSize
nodequeue_load_queues_fixed.patch2.28 KB

#1

ezra-g - June 1, 2009 - 15:44
Status:active» needs review

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

#2

ezra-g - June 1, 2009 - 16:08
Status:needs review» fixed

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

Thanks!

#3

System Message - June 15, 2009 - 16:10
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.