[bd] Cache 1.2.3

Faster and faster.

  1. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    It's up https://xfrocks.com/resources/bd-cache.8/download?version=187
    Fred. likes this.
  2. Lemminator

    Lemminator New Member

    hi i have some error with amp. Webmaster tools say

    the Attribut "onerror" in Tag "amp-img" is not allow
  3. Fred.

    Fred. New Member

    Yes, I have the add-on for that.
    Oh, ok. Then I better wait until it's finished.
    My Chrome AMP validator says it's a valid AMP page. :)
    No Worries! Take your time. It's ready when it's ready ;)
  4. Fred.

    Fred. New Member

  5. cyberpedz

    cyberpedz New Member

    I tried this. Then uninstalled now users are having serious issues with using the site. Menu is not showing properly. Post reply box is not visible all they can see is the reply button etc but the actual input box is not showing. I have hunted around and found the Page_cache folder which had nothing in. Deleted it anyway.

    Also found in internal_data a folder called templates which is full of .CSS.php files are these default xenforo or the CSS to file option from this adon any help would be welcome
  6. eva2000

    eva2000 New Member

    #186 eva2000, Aug 30, 2016
    Last edited: Aug 30, 2016
    how does one view the amp generated pages ? on my mobile i am not seeing it ? or is it just something google picks up via the amphtml header ?

    also i am seeing 404 error for incorrectly referenced html source for /bdCache/amp_logo.png

    it's referenced as forumurl/bdCache/amp_logo.png

    other AMP validation errors include
    The attribute 'http-equiv' may not appear in tag 'meta name= and content='.
    The tag 'noscript > style[amp-boilerplate] - old variant' is deprecated - use 'noscript > style[amp-boilerplate]' instead. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    The mandatory text (CDATA) inside tag 'noscript > style[amp-boilerplate] - old variant' is missing or incorrect. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    The attribute 'style' may not appear in tag 'div'.
    The tag 'div90' is disallowed.
    The tag 'noscript > style[amp-boilerplate]' appears more than once in the document. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    The attribute 'amp-custom' may not appear in tag 'noscript > style[amp-boilerplate] - old variant'. (see https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md)
    The tag 'script' is disallowed except in specific forms.
    edit: sorry most of the errors besides tag div90 disallowed are related to ngx_pagespeed which i added an exclusion rule for

    pagespeed Disallow *?amp=*;
    End result is


    fixed 404 by changing bdcache_amp_header template from

    <amp-img src="@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}"
    <amp-img src="/@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}"
    Amin Sabet likes this.
  7. eva2000

    eva2000 New Member

    on Chrome on Android 6.0.1 via S7 mobile seems amp page subsequent posts aren't loading ALL attached images in posts - some just come up as 3 dots

    example https://community.centminmod.com/threads/forum-new-style-flat-pixel-default.8162/?amp=1469691841

    edit: seems after a few refreshes all images are now loaded

    fyi, i changed bdcache_amp_header template for text based logo support in flatawesomeplus style
          <div id="logo"><a href="{$logoLink}">
              <xen:if is="@xb_logoastext">
              <xen:else />
              <amp-img src="/@imagePath/bdCache/amp_logo.png" title="{$xenOptions.boardTitle}" width="600" height="60" layout="fixed" />
  8. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    How is @imagePath configured in your style property? The prefixed "/" should not be necessary.

    Yeah, for style specific stuff, it's best to edit the template directly ;) How is it working for you now?
  9. rimesia

    rimesia New Member

    [client ***] File does not exist: /home/***/public_html/forums/data/bdCache/css/1470578795

    I'm getting lots of this errors in my apache error log. I deactivated extension but still couldn't solve this. Any idea ?
  10. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Search bot or other crawlers might have save older version of your sites and when they try to access the out dated css files, it will generate those errors. You can safely ignore those because fresh files are regularly generated by itself.
  11. Sebouley

    Sebouley New Member

    On my install, only the first page of a thread gets an AMP equivalent

    All subsequent pages don't have AMP tags in the source header.

    Same is true on this board (xfrocks.com / @xfrocks )

    this is with any style, including the default one. Sounds like a major bug.
  12. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Actually it was designed that way because currently only Google News support AMP so the meta tags are rendered for the first page only. In future release, this behavior may change.
  13. chromaniac

    chromaniac New Member

    Just installed this. Not sure where I can find the option to clear cache of individual pages. Also not sure how to check if and how AMP is working. Any suggestions are welcome! Thanks.
  14. chromaniac

    chromaniac New Member

    so i tested with a pretty long cache limit (24 hours). the homepage with recent posts widget got stuck on a snapshot from many hours ago. now, no matter what i do, the cache is not getting renewed. tried reducing the time limit to 10 second, 1 minute, 10 minutes. tried disabling the plugin and re-enabling it. the cache is not resetting! i also cannot find any control to reset the cache. what am i missing!
  15. RoldanLT

    RoldanLT Active Member

    Restart Memcached or Redis caching?
  16. chromaniac

    chromaniac New Member

    I don't think I have any cache on my Dreamhost VPS right now. Backend shows APC but XenForo freaks out whenever I turn it on. So I am relying on file based caching right now.
    Noticed the bdcache folder in internal data folder and cleaning it up seems to have solved my problem. But still wondering about this part from product description:

    Even with cache set at 10 minutes interval, homepage did not update at all for hours! It only refreshed when I emptied the bdcache folder. I am wondering if I should set up a cron job to empty that folder at regular intervals?
  17. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    You can view source to check the timestamp of the cached page, something like:

    <meta name="bdcache" content="1476362902" />
    You can also force a purge by clicking the add-on link on the moderator bar. Some style may hide additional links so try to find it in default style first.

    To check for amp, view source and look for something like:

    <link rel="amphtml" href="http://domain.com/xenforo/threads/1234/?amp=1234567890">
    View the link in your browser to see how it will look in AMP, make sure you resize the browser window so the width is <800px. AMP works best on mobile devices.
  18. ngannguyen

    ngannguyen New Member

    I installed the latest version of this addon but I can not see any cache files stored in this folder: .../internal_data/bdCache
    And users have to refresh or press CTRL F5 continuously to clear caches so as to view the latest/updated data in our forum
    What are the problems ?
    Any special configuration to fix these ones ?
    Any requirements from server side ?

  19. chromaniac

    chromaniac New Member

    Right. It was my theme that was hiding the cache cleaning links :D Now it makes complete sense.
    xfrocks likes this.
  20. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    By default, the cache data is saved in the configured Cache Backend (see https://xenforo.com/help/cache/) which is normally faster.

    It only fallback to use /internal_data if your site does not have a cache configured, if you still want to use the filesystem, add this to your config.php:
    $config['bdCache_forceFile'] = true;
    The default TTL for cached page is 10 minutes. You can either disable the cache pages feature or reduce that time in the add-on options page (AdminCP > Home > Options > [bd] Cache).
    ngannguyen likes this.