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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -