Announcement

Collapse
No announcement yet.

disable cache on external.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Forum] disable cache on external.php

    I know this is an unusual request, but I have a requirement disable the cache on external.php (so that it gives a realtime feed).

    Is this possible, does anyone know how?

    It wont get hit very often, so server load isnt an issue, but it needs to be 100% realtime.

    thanks

    Martin

  • #2
    anybody? Anyone? Anywhere?

    Comment


    • #3
      AdminCP > vBulletin Options > External Data Provider > Cache Lifespan. Minimum value is 1 (minute). There's currently no option to disable it completely, unless you're willing to hack the code (external.php in forum root). Look for these lines and change accordingly (this is for vB 3.7.7, code might no be 100% the same, but should serve as a guidance what and where to look for).
      Code:
      if (!intval($vbulletin->options['externalcache']) OR $vbulletin->options['externalcache'] > 1440)
      {
      	$externalcache = 60;
      }
      else
      {
      	$externalcache = $vbulletin->options['externalcache'];
      }
      
      $cachetime = $externalcache * 60;
      $cachehash = md5(
      	$vbulletin->options['externalcutoff'] . '|' .
      	$externalcache . '|' .
      	$vbulletin->GPC['type'] . '|' .
      	$vbulletin->GPC['lastpost'] . '|' .
      	$vbulletin->GPC['nohtml'] . '|' .
      	$vbulletin->GPC['fulldesc'] . '|' .
      	$count . '|' .
      	$forumsql
      );
      Also, please don't bump your thread after only three hours without an answer. It's rude.
      - highly ill, but always intelligent -

      Comment


      • #4
        Originally posted by djr View Post
        Also, please don't bump your thread after only three hours without an answer. It's rude.
        Hi DJR

        thanks for your fantastic response - I will have a hack aboout with a copy of the file,

        also - nic to have a great response on here. Recently it seems that only Lynne (and now yourself) have been providing knowledgable answers.

        thanks again,

        MOG

        Comment


        • #5
          You're welcome and needless to say, any hacks do not survive upgrades So remember to reapply after every upgrade.
          - highly ill, but always intelligent -

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X