A: 

Did you do

$smarty->cache_handler_func = 'mysql_cache_handler';

before the display()?

JochenJung
A: 

yes i did it. I have also declared $smarty->caching = true