Closed (fixed)
Project:
Advanced cache
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Oct 2007 at 07:35 UTC
Updated:
31 Dec 2007 at 06:11 UTC
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');
Comments
Comment #1
robertdouglass commentedgood catch. I'll look into this and cook up a fix.
Comment #2
robertdouglass commented@firebus please move forward with your fix. Thanks.
Comment #3
ilmaestro commentedfirebus, 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.
Comment #4
firebus commentedcommitted in advcache.module revision 1.1.2.7
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.