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

neerajsingh’s picture

There are few functions and interface provided by Drupal API. This might help in your scenario.

jackenmail’s picture

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