By gp.mazzola on
Hi I am writing a very simple module to trigger the execution of a function when I access a link:
my code is:
/*
* Implementation of hook_menu()
*
*/
function agenda_menu() {
$items = array();
$items[] = array(
'path' => 'agenda/send',
'callback' => 'agenda_sendsms',
'type' => MENU_CALLBACK,
'access' => user_access('send sms'),
);
return $items;
}
function agenda_sendsms() {
$time = mktime();
print date('c',$time);
}
This is just for test purpose. It works and if I point the browser to that link, the module prints the date.
My problem is that if I access the link a few seconds later, I obtain the same timestamp, as if it is caching the page.
I do not want that drupal caches for this link, neither for anonymous users.
Is there a way to disable caching for just this path?
Thank you