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 |
Jump to:
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
good catch. I'll look into this and cook up a fix.
#2
@firebus please move forward with your fix. Thanks.
#3
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
committed in advcache.module revision 1.1.2.7
#5
Automatically closed -- issue fixed for two weeks with no activity.