Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By nitin.k on
I am trying to cache a page which is created by hook menu in my custom module.
Now i want to cache it programmatically.
Any help is appreciated.
Comments
check out "cache.inc"
There are few functions and interface provided by Drupal API. This might help in your scenario.
Using Cache API
Hello Nitin,
You can use caching in code by using following functions :
cache_get()
cache_set()
cache_clear_all()
For more detail see these tutorial, Beginner's Guide to Caching Data in Drupal 7
Thanks
Jayesh