1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Can I cache output of a page callback function?

Discussion in 'XenForo Questions and Support' started by rhodes, Jan 27, 2016.

  1. rhodes

    rhodes Active Member

    Hello,

    I have a page page_x where content is created by a callback function mycallback_1()

    This function retrieves data from an external source with PHP cURL. This data is updated frequently, every 2-4 hours.

    So in general it would not be neccessary to call mycallback_1() (and cURl) on every page view. I'm not sure if and how Xenforo caches pages. Can I do this? Let's say can I cache page_x for half an hour within the xenforo system (maybe with a setting in setting.php) ?

    Regards, rhodes
     
  2. Mike

    Mike XenForo Developer Staff Member

    If you wanted to do caching, it would really be down to you doing it within your callback. The raw page view from XenForo itself isn't cached.
     

Share This Page