drupal - cache_set syntax issue -
cache_set($id, 'cache', serialize($my_data), time() + 360);
i setting cache above. not set cache specified unix time stamp of 1 day. $id = id of cache; $my_data = data cached; 'cache' = table stored; time() + 360 = unix timestamp;
so , correct syntax should cache_set($id,$data,'cache',time()+(24*60*60))
not update cache table. operation cache_get($id)
not execute.
shots in dark...
if using drupal 5 should work fine. things remember: $id should string.
format drupal 6:
cache_set($id, $my_data, 'cache', time() + 360)
- you don't need serialize happens within cache_set()
Comments
Post a Comment