• Resolved prionkor

    (@prionkor)


    Hello,

    HB plugin saves cached files in wphb-cache directory but index.html files inside the directory exists but empty. There is another file same directory, name of the file is hashed.

    
    /page-name/
       - [hash].html
       - index.html
    

    I’ve found this page https://wordpress.org/support/topic/nginx-cache-hummingbird-cache/ which has nginx code

    
    location / {
        try_files "/wp-content/wphb-cache/cache/$http_host/$request_uri/index.html" $uri $uri/ /index.php?$args;
    }
    

    But I am not sure how will server the show [hash].html file instead of empty index.html file?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Adam – WPMU DEV Support

    (@wpmudev-support8)

    Hi @prionkor

    I hope you’re well today and thank you for your question!

    I must admit I’m not quite sure about it as I’m not much of an expert if it comes to nginx configuration (I do use it sometimes and can find “basic way around” but that’s it).

    I need to consult it with our Hummingbird team so I’ve asked them and am awaiting their response.

    I’d appreciate some patience on this and either I or one of my colleagues will update you here again with more information once we only get feedback from our developers on this.

    Best regards,
    Adam

    Thread Starter prionkor

    (@prionkor)

    Adam, That is fine. I will wait for a reply 🙂

    Plugin Support Adam – WPMU DEV Support

    (@wpmudev-support8)

    Hi @prionkor

    Thanks you for your patience and I’m sorry for keeping you waiting.

    It seems it’s not possible out of the box but should work with a bit of additional code that “extends” and slightly modifies the way Hummingbird handles cache. One of our developers shared this code for you:

    https://gist.github.com/wpmudev-sls/7e3ccd589eb104d0f7173859a5696055

    The first step is to add this code to the site as MU plugin. Second step is to configure it according to comments in the code. They are pretty self-explanatory I believe so you should get the idea.

    And the last step then is to add a rule (see comment in the header of the code) to the nginx configuration.

    Finally, you’ll need to clear all caches (Hummingbird’s Page Cache and every other cache on site/server that you might possibly be using).

    Best regards,
    Adam

    Thread Starter prionkor

    (@prionkor)

    Adam,

    So, basically we need to rename the cache html file to something more predictable. Then serve via nginx.

    I will try out this code and let you know. Thank you for going above and beyond with the support! Really appreciate it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Serving cached html pages using nginx’ is closed to new replies.