advcache_nodeapi never expires nodes cached for anonymous users

firebus - October 12, 2007 - 07:35
Project:Advanced cache
Version:5.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:firebus
Status:closed
Description

advcache_array2int returns 0.5 for anonymous users, because pow(2, -1) returns 0.5. i'm running php 4.3.9. perhaps this behavior is different in php5?

anyway i've got cids like "100::0.5" in the cache_node table.

advcache_nodeapi only expires cache entries with integer suffixes (for ($i = 1; $i < $maxrole; $i++), so the anonymous nodes are never expired.

the least elegant way i could find to fix this was to expire anonymous nodes with an extra line in advcache_nodeapi

cache_clear_all($node->nid. '::0.5', 'cache_node');

#1

robertDouglass - October 12, 2007 - 21:41

good catch. I'll look into this and cook up a fix.

#2

robertDouglass - December 5, 2007 - 10:16

@firebus please move forward with your fix. Thanks.

#3

ilmaestro - December 8, 2007 - 00:51

firebus, i think your suggested fix is fine as long as we're sure that the only decimal that will ever be returned by advcache_array2int is the .5 value for anon users.

#4

firebus - December 17, 2007 - 06:06
Assigned to:Anonymous» firebus
Status:active» fixed

committed in advcache.module revision 1.1.2.7

#5

Anonymous - December 31, 2007 - 06:11
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.